-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
113 lines (94 loc) · 2.94 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
105
106
107
108
109
110
111
112
113
import com.vanniktech.maven.publish.JavadocJar
import com.vanniktech.maven.publish.KotlinMultiplatform
import com.vanniktech.maven.publish.SonatypeHost
plugins {
kotlin("multiplatform") version "1.9.23"
id("org.jetbrains.compose") version "1.6.11"
id("com.android.library") version "8.2.0"
id("signing")
id("com.vanniktech.maven.publish") version "0.29.0"
}
group = "io.github.iamcalledrob"
version = "1.0.4"
repositories {
mavenCentral()
google()
}
kotlin {
jvmToolchain(17)
jvm()
androidTarget()
applyDefaultHierarchyTemplate()
sourceSets {
commonMain {
dependencies {
implementation("androidx.graphics:graphics-shapes:1.0.1")
implementation(compose.foundation)
}
}
// Leaving some hope that androidx.graphics:graphics-shape may eventually support
// non-desktop multiplatform targets too.
val nonAndroidMain by creating {
dependsOn(commonMain.get())
}
jvmMain.get().dependsOn(nonAndroidMain)
}
}
android {
namespace = "io.github.iamcalledrob.smoothRoundedCornerShape"
compileSdk = 34
}
// --- Signing + Publishing ---
//
// Make sure the following are accessible via gradle.properties.
// If they are missing or invalid, expect cryptic and misleading errors.
// Ideally in ~/.gradle/gradle.properties so it's not checked in to source control:
// - signing.gnupg.keyId,
// - signing.gnupg.password
// - signing.gnupg.secretKeyRingFile
// - mavenCentralUsername
// - mavenCentralPassword
val githubAccount = "iamcalledrob"
val githubRepository = "smooth-rounded-corner-shape"
val githubUrl = "https://github.com/$githubAccount/$githubRepository"
val email = "[email protected]"
val projectDescription = "SmoothRoundedCornerShape"
mavenPublishing {
coordinates(groupId = group.toString(), artifactId = githubRepository, version = version.toString())
configure(
KotlinMultiplatform(
javadocJar = JavadocJar.Empty(),
sourcesJar = true,
androidVariantsToPublish = listOf("debug", "release"),
)
)
pom {
name.set(githubRepository)
description.set(projectDescription)
url.set(githubUrl)
licenses {
license {
url.set("$githubUrl/blob/master/LICENSE.TXT")
}
}
developers {
developer {
id.set(githubAccount)
name.set(githubAccount)
url.set(githubUrl)
}
}
scm {
url.set(githubUrl)
connection.set("scm:git:git://github.com/$githubAccount/$githubRepository.git")
developerConnection.set("scm:git:ssh://[email protected]/$githubAccount/$githubRepository.git")
}
}
publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL)
signAllPublications()
}
signing {
println("Signing...")
useGpgCmd()
sign(publishing.publications)
}