-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
169 lines (143 loc) · 5.01 KB
/
Copy pathbuild.gradle.kts
File metadata and controls
169 lines (143 loc) · 5.01 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
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
160
161
162
163
164
165
166
167
168
169
import groovy.lang.Closure
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
alias(libs.plugins.android.application) apply false
alias(libs.plugins.android.library) apply false
alias(libs.plugins.kotlin.multiplatform) apply false
alias(libs.plugins.android.kotlin.multiplatform.library) apply false
alias(libs.plugins.compose.multiplatform) apply false
alias(libs.plugins.kotlin.jvm) apply false
alias(libs.plugins.kotlin.compose) apply false
alias(libs.plugins.kotlin.dokka) apply false
alias(libs.plugins.google.ksp) apply false
alias(libs.plugins.hilt) apply false
alias(libs.plugins.nexus.publish)
alias(libs.plugins.grgit)
}
apply {
from("$rootDir/gradle/versioning.gradle")
from("$rootDir/gradle/maven-publish-config.gradle")
}
private val buildVersionName: Closure<Any> by ext
private val buildVersionCode: Closure<Any> by ext
version = buildVersionName()
group = "com.motorro.rxlcemodel"
description = "A reactive data loading for Android based on RxJava and `Loading`/`Content`/`Error` states."
allprojects {
val versionName by extra(buildVersionName())
val versionCode by extra(buildVersionCode())
val androidBuildToolsVersion by extra("35.0.0")
val androidMinSdkVersion by extra(24)
val androidTargetSdkVersion by extra(36)
val androidCompileSdkVersion by extra(36)
val developerId by extra("motorro")
val developerName by extra("Nikolai Kotchetkov")
val developerEmail by extra("motorro@gmail.com")
val projectScm by extra("https://github.com/motorro/CommonStateMachine.git")
val projectUrl by extra("https://github.com/motorro/CommonStateMachine")
val docDir by extra("${projectDir}/docs")
tasks.withType<KotlinCompile>().configureEach {
compilerOptions {
freeCompilerArgs.addAll(listOf(
"-opt-in=kotlin.RequiresOptIn",
"-Xexpect-actual-classes"
))
}
}
tasks.withType<Test>().configureEach {
forkEvery = 100
testLogging {
events("skipped", "failed")
showExceptions = true
exceptionFormat = TestExceptionFormat.FULL
showCauses = true
showStackTraces = true
// set options for log level DEBUG and INFO
debug {
events("started", "passed", "skipped", "failed", "standardOut", "standardError")
exceptionFormat = TestExceptionFormat.FULL
}
info.events = debug.events
info.exceptionFormat = debug.exceptionFormat
}
}
}
tasks.register("runLceUnitTests") {
dependsOn(":lce:check")
group = "verification"
description = "Run unit tests for Lce library."
}
tasks.register("runCacheUnitTests") {
dependsOn(":cache:check")
group = "verification"
description = "Run unit tests for Cache library."
}
tasks.register("runRxUnitTests") {
dependsOn(":rx:check")
group = "verification"
description = "Run unit tests for Rx library."
}
tasks.register("runCoroutinesUnitTests") {
dependsOn(":coroutines:check")
group = "verification"
description = "Run unit tests for Rx library."
}
tasks.register("runDiskLruUnitTests") {
dependsOn(":disklrucache:check")
group = "verification"
description = "Run unit tests for DiskLruCache library."
}
tasks.register("runKserializerUnitTests") {
dependsOn(":kserializer:check")
group = "verification"
description = "Run unit tests for KSerializer library."
}
tasks.register("runViewmodelUnitTests") {
dependsOn(":viewmodel:testDebugUnitTest")
group = "verification"
description = "Run unit tests for ViewModel library."
}
tasks.register("runComposeViewUnitTests") {
dependsOn(":composeview:check")
group = "verification"
description = "Run unit tests for Compose-view library."
}
tasks.register("runSampleUnitTests") {
dependsOn(":sample:check")
group = "verification"
description = "Run unit tests for Sample application."
}
tasks.register("runUnitTests") {
dependsOn(
"runLceUnitTests",
"runCacheUnitTests",
"runRxUnitTests",
"runCoroutinesUnitTests",
"runDiskLruUnitTests",
"runKserializerUnitTests",
"runViewmodelUnitTests",
"runComposeViewUnitTests",
"runSampleUnitTests"
)
group = "verification"
description = "Run unit tests for libraries."
}
tasks.register("displayVersion") {
description = "Display application version name"
doLast {
println("Project version: ${project.version}")
}
}
val ossrhUsername: String? by extra
val ossrhPassword: String? by extra
nexusPublishing {
repositories {
sonatype {
nexusUrl.set(uri("https://ossrh-staging-api.central.sonatype.com/service/local/"))
snapshotRepositoryUrl.set(uri("https://central.sonatype.com/repository/maven-snapshots/"))
username.set(ossrhUsername)
password.set(ossrhPassword)
}
}
}