forked from PranavMaganti/compose-material-dialogs
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathbuild.gradle.kts
104 lines (91 loc) · 2.86 KB
/
build.gradle.kts
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
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile
plugins {
id("org.jetbrains.compose") version "1.7.0" apply false
//id("com.diffplug.spotless") version "6.0.4"
id("org.jetbrains.dokka") version "2.0.0"
id("org.jetbrains.kotlin.plugin.compose") version "2.0.21"
}
buildscript {
repositories {
google()
mavenCentral()
maven("https://plugins.gradle.org/m2/")
}
dependencies {
classpath(Dependencies.Kotlin.gradlePlugin)
classpath("com.android.tools.build:gradle:8.8.0")
classpath("com.vanniktech:gradle-maven-publish-plugin:0.30.0")
classpath(Dependencies.Shot.core)
}
}
allprojects {
repositories {
google()
mavenCentral()
gradlePluginPortal()
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
}
}
tasks.dokkaHtmlMultiModule.configure {
outputDirectory.set(projectDir.resolve("docs/api"))
}
subprojects {
//plugins.apply("com.diffplug.spotless")
/*spotless {
kotlin {
target("*")
ktlint(Dependencies.Ktlint.version)
}
}*/
tasks.withType<KotlinJvmCompile> {
compilerOptions {
if (name.contains("android", true)) {
jvmTarget = JvmTarget.JVM_1_8
}
}
}
tasks.withType<Test> {
testLogging {
showStandardStreams = true
}
}
plugins.withType<com.android.build.gradle.BasePlugin> {
configure<com.android.build.gradle.BaseExtension> {
compileSdkVersion(35)
defaultConfig {
minSdk = 21
targetSdk = 35
testInstrumentationRunner = "com.karumi.shot.ShotTestRunner"
testApplicationId = "com.vanpra.composematerialdialogs.test"
}
compileOptions {
sourceCompatibility(JavaVersion.VERSION_1_8)
targetCompatibility(JavaVersion.VERSION_1_8)
}
}
}
plugins.withType<com.karumi.shot.ShotPlugin> {
configure<com.karumi.shot.ShotExtension> {
tolerance = 1.0
}
}
// Read in the signing.properties file if it is exists
val signingPropsFile = rootProject.file("release/signing.properties")
if (signingPropsFile.exists()) {
java.util.Properties().apply {
signingPropsFile.inputStream().use {
load(it)
}
}.forEach { key1, value1 ->
val key = key1.toString()
val value = value1.toString()
if (key == "signing.secretKeyRingFile") {
// If this is the key ring, treat it as a relative path
project.ext.set(key, rootProject.file(value).absolutePath)
} else {
project.ext.set(key, value)
}
}
}
}