This repository has been archived by the owner on Sep 11, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 466
/
Copy pathbuild.gradle.in
155 lines (131 loc) · 4.99 KB
/
build.gradle.in
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
buildscript {
ext.kotlin_version = '1.3.20'
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
repositories {
jcenter()
google()
maven { url "https://jitpack.io" }
// TODO: Remove once material-dialogs 2.0 is stable
maven {
url "https://dl.bintray.com/drummer-aidan/maven"
}
}
android {
compileSdkVersion 28
buildToolsVersion "28.0.3"
packagingOptions {
// CMake will strip the libraries automatically for release builds
doNotStrip '**.so'
}
lintOptions {
disable 'ExtraTranslation'
disable 'MissingTranslation'
}
defaultConfig {
applicationId "com.github.chenxiaolong.dualbootpatcher"
minSdkVersion 17
targetSdkVersion 28
versionCode 1
versionName "@MBP_VERSION@"
buildConfigField "String", "GIT_SHA", '"@_GIT_SHA@"'
}
signingConfigs {
release
debug
ci
}
buildTypes {
release {
signingConfig signingConfigs.release
buildConfigField "int", "APP_NAME_RESOURCE", "R.string.app_name_release"
shrinkResources true
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
signingConfig signingConfigs.debug
applicationIdSuffix ".debug"
versionNameSuffix "-DEBUG"
buildConfigField "int", "APP_NAME_RESOURCE", "R.string.app_name_debug"
// Uncomment to use proguard for debug build
//shrinkResources true
//minifyEnabled true
//proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
ci {
signingConfig signingConfigs.ci
applicationIdSuffix ".snapshot"
versionNameSuffix "-SNAPSHOT"
buildConfigField "int", "APP_NAME_RESOURCE", "R.string.app_name_snapshot"
shrinkResources true
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
matchingFallbacks = ['release']
}
}
sourceSets {
main {
java.srcDirs += ['../external/flatbuffers/java']
assets.srcDirs += ['@CMAKE_BINARY_DIR@/assets/']
jniLibs.srcDirs += ['@CMAKE_BINARY_DIR@/android/result/lib/']
}
}
}
def readSigningConfig(path, target) {
def props = new Properties()
def propFile = new File(path)
if (propFile.canRead()) {
props.load(new FileInputStream(propFile))
if (props != null
&& props.containsKey('keystore')
&& props.containsKey('keystore_passphrase')
&& props.containsKey('key_alias')
&& props.containsKey('key_passphrase')) {
target.storeFile = file(props['keystore'])
target.storePassword = props['keystore_passphrase']
target.keyAlias = props['key_alias']
target.keyPassword = props['key_passphrase']
return true
}
}
return false
}
readSigningConfig('@_RELEASE_SIGN_CONFIG_PATH@', android.signingConfigs.release)
readSigningConfig('@_DEBUG_SIGN_CONFIG_PATH@', android.signingConfigs.debug)
readSigningConfig('@_CI_SIGN_CONFIG_PATH@', android.signingConfigs.ci)
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation "androidx.lifecycle:lifecycle-extensions:2.1.0-alpha01"
kapt "androidx.lifecycle:lifecycle-compiler:2.1.0-alpha01"
implementation 'androidx.appcompat:appcompat:1.1.0-alpha01'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.core:core-ktx:1.0.1'
implementation 'androidx.fragment:fragment-ktx:1.0.0'
implementation 'androidx.palette:palette:1.0.0'
implementation 'androidx.preference:preference:1.1.0-alpha02'
implementation 'androidx.recyclerview:recyclerview:1.1.0-alpha01'
implementation 'com.afollestad.material-dialogs:core:2.0.0-rc9'
implementation 'com.afollestad.material-dialogs:input:2.0.0-rc9'
implementation 'org.apache.commons:commons-text:1.3'
implementation 'com.github.clans:fab:1.6.4'
implementation 'com.google.android.material:material:1.1.0-alpha02'
implementation 'com.google.code.gson:gson:2.8.2'
implementation 'com.squareup.picasso:picasso:2.71828'
implementation 'net.java.dev.jna:jna:4.5.1@aar'
implementation project(":emulatorview")
implementation project(":rootshell")
debugImplementation 'com.squareup.leakcanary:leakcanary-android:1.5.4'
releaseImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.4'
ciImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.4'
}