-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
104 lines (87 loc) · 2.56 KB
/
build.gradle
File metadata and controls
104 lines (87 loc) · 2.56 KB
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
plugins {
id 'com.android.library'
alias libs.plugins.kotlin.android
}
android {
compileSdkVersion libs.versions.compile.sdk.version.get()
namespace 'org.twinlife.twinme'
buildFeatures {
buildConfig = true
}
defaultConfig {
minSdkVersion libs.versions.min.sdk.version.get() as int
targetSdkVersion libs.versions.target.sdk.version.get() as int
buildConfigField "String", "VERSION", '"2.13.2"'
buildConfigField "boolean", "ENABLE_REPORT_LOCATION", "false"
buildConfigField "boolean", "DELETE_CONTACT_ON_UNBIND_CONTACT", "false"
}
flavorDimensions = ["product", "tier"]
productFlavors {
twinme {
dimension "product"
}
skred {
dimension "product"
buildConfigField "boolean", "ENABLE_REPORT_LOCATION", "true"
buildConfigField "boolean", "DELETE_CONTACT_ON_UNBIND_CONTACT", "true"
}
//Skred and Twinme
free {
dimension "tier"
}
//Twinme+
'+' {
dimension "tier"
}
}
// Only define necessary variants
variantFilter { variant ->
def names = variant.flavors*.name
if (names.contains("skred")) {
if(names.contains("+")) {
// skred doesn't have a "plus" variant
setIgnore(true)
}
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
staging {
initWith buildTypes.release
}
}
sourceSets {
main {
manifest.srcFile 'src/android/AndroidManifest.xml'
java.srcDirs = ['src/main/java', 'src/android/java']
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
api fileTree(include: ['*.jar'], dir: 'libs')
implementation project(':twinlife-framework')
implementation libs.androidx.annotation
implementation libs.zip4j
testImplementation libs.junit.jupiter
}
// Needed to configure JUnit in an Android library project.
afterEvaluate { project ->
android.libraryVariants.each { variant ->
println variant.name
println tasks
tasks.getByName("test${variant.name.capitalize()}UnitTest") {
useJUnitPlatform()
maxHeapSize = '1G'
testLogging {
events "passed"
}
}
}
}