-
Notifications
You must be signed in to change notification settings - Fork 62
/
Copy pathconfig.gradle
59 lines (50 loc) · 2 KB
/
config.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
/*
* Copyright © 2018-2024 PSPDFKit GmbH. All rights reserved.
*
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
* UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
* This notice may not be removed from this file.
*/
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath "org.yaml:snakeyaml:1.27"
}
}
import org.yaml.snakeyaml.Yaml
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}
ext.flutterRoot = localProperties.getProperty('flutter.sdk') ?: "$System.env.FLUTTER_ROOT"
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}
ext.pspdfkitMavenUrl = localProperties.getProperty('pspdfkit.mavenUrl')
if (pspdfkitMavenUrl == null || pspdfkitMavenUrl == '') {
ext.pspdfkitMavenUrl = 'https://my.nutrient.io/maven/'
}
ext.pspdfkitVersion = localProperties.getProperty('pspdfkit.version')
if (pspdfkitVersion == null || pspdfkitVersion == '') {
ext.pspdfkitVersion = '2024.9.0'
}
ext.pspdfkitMavenModuleName = 'pspdfkit'
// Get our library version from the top level pubspec.yaml file.
def pubspecFilePath = '../pubspec.yaml'
def pubspecFile = rootProject.file(pubspecFilePath)
if (!pubspecFile.exists()) {
throw new GradleException("'pubspec.yaml' file not found. Expected at the top level of the Flutter repository.")
}
def pubspecYaml = new Yaml().load(pubspecFile.newInputStream())
ext.pspdfkitFlutterVersion = pubspecYaml.version
ext.androidCompileSdkVersion = 35
ext.androidMinSdkVersion = 21
ext.androidTargetSdkVersion = 35
ext.androidGradlePluginVersion = '8.7.2'
ext.kotlinVersion = "1.9.20"