-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
92 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
plugins { | ||
kotlin("multiplatform") | ||
id("org.jetbrains.dokka") version "1.7.20" | ||
id("org.jetbrains.compose") version "1.3.0" | ||
id("org.jetbrains.dokka") version "1.9.10" | ||
id("org.jetbrains.compose") | ||
id("com.android.library") | ||
id("maven-publish") | ||
id("signing") | ||
} | ||
|
||
kotlin { | ||
android("android") { | ||
androidTarget("android") { | ||
publishLibraryVariants("release") | ||
} | ||
jvm() | ||
|
@@ -21,45 +21,23 @@ kotlin { | |
dependencies { | ||
api(compose.runtime) | ||
implementation(compose.material) | ||
implementation("com.github.ajalt.colormath:colormath:3.2.0") | ||
implementation("com.github.ajalt.colormath:colormath:3.4.0") | ||
} | ||
} | ||
val commonTest by getting { | ||
dependencies { | ||
implementation(kotlin("test")) | ||
} | ||
} | ||
val androidTest by getting { | ||
dependencies { | ||
implementation("junit:junit:4.13.2") | ||
} | ||
} | ||
val jvmMain by getting { | ||
dependencies { | ||
implementation(compose.preview) | ||
} | ||
} | ||
val jvmTest by getting | ||
} | ||
|
||
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> { | ||
kotlinOptions.jvmTarget = "11" | ||
} | ||
jvmToolchain(17) | ||
} | ||
|
||
android { | ||
namespace = "com.godaddy.common.colorpicker" | ||
compileSdk = 33 | ||
compileSdk = 34 | ||
defaultConfig { | ||
minSdk = 21 | ||
} | ||
compileOptions { | ||
sourceCompatibility = JavaVersion.VERSION_11 | ||
targetCompatibility = JavaVersion.VERSION_11 | ||
} | ||
} | ||
|
||
val dokkaOutputDir = buildDir.resolve("dokka") | ||
val dokkaOutputDir = layout.buildDirectory.dir("dokka") | ||
|
||
tasks.dokkaHtml.configure { | ||
outputDirectory.set(dokkaOutputDir) | ||
|
@@ -78,74 +56,75 @@ val javadocJar = tasks.register<Jar>("javadocJar") { | |
val sonatypeUsername: String? = System.getenv("ORG_GRADLE_PROJECT_mavenCentralUsername") | ||
val sonatypePassword: String? = System.getenv("ORG_GRADLE_PROJECT_mavenCentralPassword") | ||
|
||
if (sonatypeUsername != null && sonatypePassword != null) { | ||
|
||
afterEvaluate { | ||
configure<PublishingExtension> { | ||
publications.all { | ||
val mavenPublication = this as? MavenPublication | ||
afterEvaluate { | ||
configure<PublishingExtension> { | ||
publications.all { | ||
val mavenPublication = this as? MavenPublication | ||
|
||
mavenPublication?.artifactId = | ||
"compose-color-picker${ | ||
"-$name".takeUnless { "kotlinMultiplatform" in name }.orEmpty() | ||
}".removeSuffix("Release") | ||
mavenPublication?.artifactId = | ||
"compose-color-picker${ | ||
"-$name".takeUnless { "kotlinMultiplatform" in name }.orEmpty() | ||
}".removeSuffix("Release") | ||
} | ||
} | ||
} | ||
} | ||
|
||
signing { | ||
setRequired { | ||
// signing is only required if the artifacts are to be published | ||
gradle.taskGraph.allTasks.any { PublishToMavenRepository::class == it.javaClass } | ||
signing { | ||
setRequired { | ||
// signing is only required if the artifacts are to be published | ||
gradle.taskGraph.allTasks.any { PublishToMavenRepository::class == it.javaClass } | ||
} | ||
sign(configurations.archives.get()) | ||
sign(publishing.publications) | ||
} | ||
sign(configurations.archives.get()) | ||
sign(publishing.publications) | ||
} | ||
publishing { | ||
publishing { | ||
|
||
publications.withType(MavenPublication::class) { | ||
groupId = "com.godaddy.android.colorpicker" | ||
artifactId = "compose-color-picker" | ||
version = "0.7.0" | ||
publications.withType(MavenPublication::class) { | ||
groupId = "com.godaddy.android.colorpicker" | ||
artifactId = "compose-color-picker" | ||
version = "0.7.0" | ||
|
||
artifact(tasks["javadocJar"]) | ||
artifact(tasks["javadocJar"]) | ||
|
||
pom { | ||
pom { | ||
|
||
name.set("compose-color-picker") | ||
description.set("A compose component for picking a color") | ||
url.set("https://github.com/godaddy/compose-color-picker") | ||
name.set("compose-color-picker") | ||
description.set("A compose component for picking a color") | ||
url.set("https://github.com/godaddy/compose-color-picker") | ||
|
||
licenses { | ||
license { | ||
name.set("The MIT License (MIT)") | ||
url.set("https://opensource.org/licenses/MIT") | ||
licenses { | ||
license { | ||
name.set("The MIT License (MIT)") | ||
url.set("https://opensource.org/licenses/MIT") | ||
} | ||
} | ||
} | ||
developers { | ||
developer { | ||
id.set("godaddy") | ||
developers { | ||
developer { | ||
id.set("godaddy") | ||
name.set("GoDaddy") | ||
} | ||
} | ||
organization { | ||
name.set("GoDaddy") | ||
} | ||
} | ||
organization { | ||
name.set("GoDaddy") | ||
} | ||
scm { | ||
connection.set("scm:git:git://github.com/godaddy/compose-color-picker.git") | ||
developerConnection.set("scm:git:ssh://[email protected]/godaddy/compose-color-picker.git") | ||
url.set("https://github.com/godaddy/compose-color-picker") | ||
scm { | ||
connection.set("scm:git:git://github.com/godaddy/compose-color-picker.git") | ||
developerConnection.set("scm:git:ssh://[email protected]/godaddy/compose-color-picker.git") | ||
url.set("https://github.com/godaddy/compose-color-picker") | ||
} | ||
} | ||
} | ||
} | ||
|
||
repositories { | ||
maven { | ||
setUrl("https://oss.sonatype.org/service/local/staging/deploy/maven2/") | ||
credentials { | ||
username = sonatypeUsername | ||
password = sonatypePassword | ||
repositories { | ||
maven { | ||
setUrl("https://oss.sonatype.org/service/local/staging/deploy/maven2/") | ||
credentials { | ||
username = sonatypeUsername | ||
password = sonatypePassword | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters