-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle
112 lines (97 loc) · 3.75 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
plugins {
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.protobuf)
}
java.toolchain.languageVersion = JavaLanguageVersion.of(rootProject.javaToolchainVersion.toString())
android {
compileSdk = libs.versions.sdk.compile.get().toInteger()
buildToolsVersion = libs.versions.buildTools.get()
compileOptions {
sourceCompatibility = rootProject.javaVersion
targetCompatibility = rootProject.javaVersion
}
kotlinOptions {
jvmTarget = rootProject.javaVersion
// allWarningsAsErrors = true // replaced by "DeprecatedCall" in lint
}
namespace = "org.mtransit.android.commons"
defaultConfig {
consumerProguardFiles("proguard-rules.pro")
minSdk = libs.versions.sdk.min.get().toInteger()
targetSdk = libs.versions.sdk.target.get().toInteger()
manifestPlaceholders.permission_provider_read = "org.mtransit.android.provider.permission.READ_PROVIDER"
manifestPlaceholders.permission_receiver_broadcast = "org.mtransit.android.receiver.permission.BROADCAST_RECEIVER"
manifestPlaceholders.target_sdk_version = libs.versions.sdk.target.get()
manifestPlaceholders.pkg_namespace = namespace
}
buildFeatures {
buildConfig = true
}
buildTypes {
debug {
manifestPlaceholders.permission_provider_read = "org.mtransit.android.debug.provider.permission.READ_PROVIDER"
manifestPlaceholders.permission_receiver_broadcast = "org.mtransit.android.debug.receiver.permission.BROADCAST_RECEIVER"
}
}
testOptions {
unitTests {
includeAndroidResources = true
returnDefaultValues = true
tasks.withType(Test).configureEach {
jvmArgs "-noverify"
testLogging {
events("passed", "skipped", "failed")
}
}
}
}
packagingOptions {
resources {
excludes += ['META-INF/DEPENDENCIES']
}
}
}
dependencies {
api(project(":commons-java"))
implementation(platform(libs.kotlin.bom))
implementation(platform(libs.kotlinx.coroutines.bom))
implementation(libs.bundles.kotlin)
implementation(libs.bundles.kotlin.android)
implementation(libs.androidx.core)
implementation(libs.androidx.sqlite)
implementation(libs.androidx.room.common) // annotations only
implementation(libs.bundles.workManager)
implementation(libs.gps.basement) // update security provider for SSL
implementation(libs.play.appUpdate)
implementation(libs.protobuf.javaLite)
// implementation(libs.protobuf.java)
implementation(libs.bundles.retrofit)
implementation(platform(libs.okhttp.bom))
implementation(libs.bundles.okHttp)
implementation(libs.bundles.gson)
debugImplementation(libs.chucker)
releaseImplementation(libs.chucker.noop)
implementation(libs.bundles.twitter) {
exclude group: "javax.ws.rs", module: "jsr311-api" // conflict w/ javax.ws.rs:javax.ws.rs-api
exclude group: "org.apache.oltu.oauth2", module: "org.apache.oltu.oauth2.common" // conflict w/ org.apache.oltu.oauth2.client
exclude group: "org.openapitools", module: "jackson-databind-nullable" // only used for SDK classes generations
exclude group: "org.slf4j", module: "slf4j-api" // from "org.apache.oltu.oauth2" (not used)
}
implementation(libs.guava) // used by AndroidX & Twitter SDK
testImplementation(libs.bundles.test.unit)
}
protobuf {
protoc {
artifact = libs.protobuf.compiler.get()
}
generateProtoTasks {
all().each { task ->
task.builtins {
java {
option("lite")
}
}
}
}
}