This repository has been archived by the owner on Jul 25, 2023. It is now read-only.
forked from feelfreelinux/WykopMobilny
-
Notifications
You must be signed in to change notification settings - Fork 5
/
build.gradle
executable file
·76 lines (71 loc) · 2.73 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
import com.android.build.gradle.internal.LoggerWrapper
import com.android.build.gradle.internal.tasks.DeviceProviderInstrumentTestTask
import com.android.build.gradle.internal.tasks.databinding.DataBindingMergeDependencyArtifactsTask
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import org.jetbrains.kotlin.gradle.plugin.KotlinPluginWrapperKt
plugins {
alias(libs.plugins.starter.config)
alias(libs.plugins.starter.versioning)
alias(libs.plugins.starter.library.android) apply(false)
alias(libs.plugins.osacky.doctor)
alias(libs.plugins.starter.easylauncher) apply(false)
}
commonConfig {
javaVersion JavaVersion.VERSION_11
androidPlugin {
minSdkVersion 24
}
}
allprojects {
tasks.withType(KotlinCompile).configureEach {
kotlinOptions {
freeCompilerArgs = freeCompilerArgs +
"-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi" +
"-opt-in=kotlin.time.ExperimentalTime" +
"-opt-in=kotlinx.coroutines.FlowPreview"
}
}
["com.android.library", "com.android.application"].forEach {
pluginManager.withPlugin(it) {
tasks.withType(DataBindingMergeDependencyArtifactsTask).configureEach {
outputs.cacheIf { false }
}
android.packagingOptions {
exclude 'META-INF/*.kotlin_module'
}
}
tasks.withType(DeviceProviderInstrumentTestTask).configureEach {
// doFirst {
// LoggerWrapper.Switch.shouldShowInfoLogsAsLifecycle = true
// }
// doLast {
// LoggerWrapper.Switch.shouldShowInfoLogsAsLifecycle = false
// }
}
}
pluginManager.withPlugin("com.android.library") {
android {
namespace "io.github.wykopmobilny${path.replace(":", ".").replace("-", "_")}"
}
android.variantFilter {
ignore = buildType.name != "debug"
}
}
pluginManager.withPlugin("com.android.application") {
android.buildTypes.configureEach {
setMatchingFallbacks("debug")
}
}
configurations.matching { it.name != "detekt" }.configureEach {
resolutionStrategy.eachDependency {
if (requested.group == "org.checkerframework" && requested.name != "checker-compat-qual") {
useVersion(libs.versions.mavencentral.checker.get())
because("https://github.com/google/ExoPlayer/issues/10007")
}
def kotlinVersion = KotlinPluginWrapperKt.getKotlinPluginVersion(project)
if (requested.group == 'org.jetbrains.kotlin' && requested.name.startsWith("kotlin")) {
useVersion kotlinVersion
}
}
}
}