-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
159 lines (136 loc) · 4.51 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
apply plugin: 'com.android.application'
apply plugin: 'maven'
apply plugin: 'eclipse'
apply plugin: 'io.reconquest.gradle-android-eclipse'
apply plugin: 'com.bugsnag.android.gradle'
buildscript {
repositories {
google()
jcenter()
maven {
url "https://maven.reconquest.io/"
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.+'
classpath 'io.reconquest:gradle-android-eclipse:1.2'
classpath 'com.bugsnag:bugsnag-android-gradle-plugin:4.+'
}
}
file('src/debug/vars').readLines().each() {
if (!it.isEmpty() && !it.startsWith("#")) {
def pos = it.indexOf("=")
def key = it.substring(0, pos)
def value = it.substring(pos + 1)
if (System.getenv(key) == null) {
System.setProperty("env.DEBUG_$key", value)
}
}
}
try {
file('src/release/vars').readLines().each() {
if (!it.isEmpty() && !it.startsWith("#")) {
def pos = it.indexOf("=")
def key = it.substring(0, pos)
def value = it.substring(pos + 1)
if (System.getenv(key) == null) {
System.setProperty("env.RELEASE_$key", value)
}
}
}
} catch (Exception e) { println e.getMessage() }
android {
compileSdkVersion 29
buildToolsVersion '29.0.2'
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
lintOptions {
abortOnError false
disable 'RtlHardcoded', 'HardcodedText', 'ContentDescription', 'GoogleAppIndexingWarning'
}
signingConfigs {
debug {
storeFile file('src/debug/keystore')
storePassword System.getProperty('env.DEBUG_KEYSTORE_PASSWORD')
keyAlias System.getProperty('env.DEBUG_KEYSTORE_ALIAS')
keyPassword System.getProperty('env.DEBUG_KEYSTORE_PASSWORD')
}
release {
storeFile file('src/release/keystore')
storePassword System.getProperty('env.RELEASE_KEYSTORE_PASSWORD')
keyAlias System.getProperty('env.RELEASE_KEYSTORE_ALIAS')
keyPassword System.getProperty('env.RELEASE_KEYSTORE_PASSWORD')
}
}
defaultConfig {
applicationId 'io.reconquest.carcosa'
minSdkVersion 26
targetSdkVersion 29
versionCode 1
versionName "1.0"
}
buildTypes {
debug {
applicationIdSuffix "debug"
debuggable true
minifyEnabled false
signingConfig signingConfigs.debug
zipAlignEnabled true
}
release {
applicationIdSuffix ""
debuggable false
minifyEnabled false
signingConfig signingConfigs.release
zipAlignEnabled true
}
}
}
repositories {
jcenter()
google()
}
dependencies {
implementation 'com.google.android:android:4.1.1.4'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.google.android.material:material:1.1.0-beta01'
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.biometric:biometric:1.0.0-rc01'
implementation 'com.bugsnag:bugsnag-android:4.+'
implementation 'co.infinum:goldfinger:2.0.0-RC2'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation fileTree(dir: 'libs', include: ['*.jar'])
}
configurations.implementation.setCanBeResolved(true)
eclipse {
classpath {
plusConfigurations += [ configurations.implementation ]
downloadSources = true
}
}
eclipse.jdt.file.withProperties { props ->
props.put('org.eclipse.jdt.core.compiler.codegen.targetPlatform', '1.8')
props.put('org.eclipse.jdt.core.compiler.source', '1.8')
props.put('org.eclipse.jdt.core.compiler.compliance', '1.8')
}
task pom {
pom {
project {
groupId 'io.reconquest.carcosa'
artifactId 'carcosa'
version 'POM'
}
}.withXml {
def androidHome = System.getenv("ANDROID_HOME");
def systemPath = androidHome + "/platforms/" +
android.compileSdkVersion +
"/android.jar"
def dependency = asNode().appendNode('dependencies').appendNode('dependency')
dependency.appendNode('groupId', 'android')
dependency.appendNode('artifactId', android.compileSdkVersion)
dependency.appendNode('version', android.compileSdkVersion)
dependency.appendNode('systemPath', systemPath)
}.writeTo("pom.xml")
}