forked from fabricezhang/lcg
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
80 lines (74 loc) · 2.7 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
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: "kotlin-kapt"
// App Version is composed by Major * 10000 + Minor * 100 + Patch
// each version starts from 0
def versionMajor = 1
def versionMinor = 6
def versionPatch = 2
android {
compileSdkVersion rootProject.ext.compileSdkVersion
defaultConfig {
applicationId "top.easelink.lcg"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode versionMajor * 10000 + versionMinor * 100 + versionPatch
versionName "${versionMajor}.${versionMinor}.${versionPatch}"
buildConfigField("String", "DB_NAME", "\"articles.db\"")
buildConfigField("String", "BUGLY_APP_ID", "\"b9441ed548\"")
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
manifestPlaceholders = [
MTA_APPKEY:"A6SZ9KQ7VX9T",
MTA_CHANNEL:"52POJIE"
]
}
signingConfigs {
releaseConfig {
keyAlias 'lcg'
keyPassword '52pojie'
storeFile file('../keystore.jks')
storePassword 'easelink'
}
}
buildTypes {
release {
minifyEnabled true
debuggable false
minifyEnabled true
zipAlignEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.releaseConfig
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
incremental true
}
// Generate Version Info
android.applicationVariants.all { variant ->
variant.outputs.all {
outputFileName = "lcg-${variant.versionName}.apk"
}
}
dataBinding {
enabled = true
}
buildToolsVersion = buildToolsVersion
}
dependencies {
// database
kapt "androidx.room:room-compiler:$roomVersion"
kapt "com.android.databinding:compiler:$dataBindingVersion"
kapt "com.google.dagger:dagger-compiler:$rootProject.dagger2Version"
kapt "com.google.dagger:dagger-android-processor:$rootProject.dagger2Version"
implementation project(':framework')
implementation fileTree(dir: 'libs', include: ['*.jar'])
debugImplementation "com.amitshekhar.android:debug-db:1.0.4"
// test related
testImplementation "junit:junit:$rootProject.junitVersion"
androidTestImplementation "androidx.test:runner:$rootProject.runnerVersion"
androidTestImplementation "androidx.test.espresso:espresso-core:$rootProject.espressoVersion"
}