-
Notifications
You must be signed in to change notification settings - Fork 22
/
build.gradle
executable file
·84 lines (75 loc) · 2.64 KB
/
build.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
static def getSystemVariableOrDefault(String variable, String defaultValue) {
def value = System.getenv(variable)
if(value == null) {
return defaultValue
}
return value
}
ext.public_nexus_user = "publicaccess"
def getNexusUser(){
def user = System.getenv("NEXUS_USER")
if(user == null){
println "Using public Nexus user"
user = public_nexus_user
} else {
println "Nexus user: $user"
}
return user
}
ext.public_nexus_token = "HWGxGVPtvV4p3ZS9RSXf"
def getNexusPassword(){
def pw = System.getenv("NEXUS_PASSWORD")
if(pw == null){
println "Using public Nexus password"
pw = public_nexus_token
}
return pw
}
ext.nexus_user = getNexusUser()
ext.nexus_password = getNexusPassword()
buildscript {
ext {
ext.KOTLIN_VERSION = '1.7.10'
}
ext.ANDROID_COMPILE_SDK = (System.getenv("ANDROID_COMPILE_SDK") == null ? 32 : System.getenv("ANDROID_COMPILE_SDK")).toInteger()
ext.ANDROID_TARGET_SDK = (System.getenv("ANDROID_TARGET_SDK") == null ? ANDROID_COMPILE_SDK : System.getenv("ANDROID_TARGET_SDK")).toInteger()
ext.ANDROID_MIN_SDK = (System.getenv("ANDROID_MIN_SDK") == null ? 14 : System.getenv("ANDROID_COMPILE_SDK")).toInteger()
ext.ANDROID_GRADLE_PLUGIN_VERSION = System.getenv("ANDROID_GRADLE_PLUGIN_VERSION") == null ? "7.2.1" : System.getenv("ANDROID_GRADLE_PLUGIN_VERSION")
println "COMPILE SDK Version: $ANDROID_COMPILE_SDK"
println "TARGET SDK Version: $ANDROID_TARGET_SDK"
println "MIN SDK: $ANDROID_MIN_SDK"
println "---------------------"
repositories {
mavenCentral()
google()
}
dependencies {
classpath "com.android.tools.build:gradle:$ANDROID_GRADLE_PLUGIN_VERSION"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$KOTLIN_VERSION"
classpath "org.jetbrains.dokka:dokka-android-gradle-plugin:0.9.18"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
apply plugin: 'maven-publish'
repositories {
mavenLocal()
google()
mavenCentral()
if(System.getenv("NO_PREBUILD_BINARIES") == null) {
maven {
url 'https://nexus.frostnerd.com/repository/libs-release/'
credentials {
username = "$nexus_user"
password = "$nexus_password"
}
}
}
maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
maven { url 'https://jitpack.io' }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}