Skip to content

Commit

Permalink
update: gradle build
Browse files Browse the repository at this point in the history
  • Loading branch information
Colter23 committed Oct 19, 2024
1 parent b207876 commit 643a9ac
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 13 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -243,5 +243,5 @@ fun Layout.RichParagraphTest(modifier: Modifier) {
- [ ] 背景图片
- [ ] 背景渐变色
- [ ] 主题
- [ ] 提取图片主题色, 使用 [Material Color Utilities](https://github.com/material-foundation/material-color-utilities)
- [ ] ~~提取图片主题色, 使用 [Material Color Utilities](https://github.com/material-foundation/material-color-utilities)~~ (效果不佳,暂时放弃)
- [ ] more...
64 changes: 52 additions & 12 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,23 +1,12 @@
plugins {
kotlin("jvm") version "1.9.0"
id("maven-publish")
id("signing")
}

group = "top.colter.skiko"
version = "0.0.2"

publishing {
publications {
create<MavenPublication>("maven") {
groupId = "top.colter.skiko"
artifactId = "skiko-layout"
version = "0.0.2"

from(components["kotlin"])
}
}
}

repositories {
mavenLocal()
mavenCentral()
Expand Down Expand Up @@ -59,11 +48,62 @@ tasks.test {
java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
withJavadocJar()
}

kotlin {
explicitApi()
target.compilations.all {
kotlinOptions.jvmTarget = "11"
}

}

publishing {
publications {
create<MavenPublication>("maven") {
artifact(tasks.getByName("javadocJar"))
artifact(tasks.getByName("kotlinSourcesJar"))
from(components["kotlin"])

pom {
groupId = "top.colter.skiko"
artifactId = "skiko-layout"
version = "0.0.2"
name = "Skiko Layout"
description = "Convenient use of Skiko for static layout without calculating position and size."
url = "https://github.com/Colter23/skiko-layout"
licenses {
license {
name = "MIT"
url = "https://github.com/Colter23/skiko-layout/blob/main/LICENSE"
}
}
developers {
developer {
id = "Colter23"
name = "Colter"
}
}
scm {
connection = "scm:git:git://github.com/Colter23/skiko-layout"
url = "https://github.com/Colter23/skiko-layout"
}
}
}
}

repositories {
maven {
url = uri("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/")
credentials {
username=properties["ossrhUsername"].toString()
password=properties["ossrhPassword"].toString()
}
}
}
}

signing {
sign(publishing.publications["maven"])
}

0 comments on commit 643a9ac

Please sign in to comment.