chore: merge to new maven publish way

This commit is contained in:
2023-12-28 23:35:05 +08:00
parent 1cbb12f9e1
commit 748116bbde
2 changed files with 25 additions and 39 deletions

View File

@@ -4,15 +4,16 @@ plugins {
}
group = property.project.groupName
version = property.project.yukireflection.core.version
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
kotlinOptions {
jvmTarget = "17"
kotlin {
jvmToolchain(17)
compilerOptions {
freeCompilerArgs = listOf(
"-Xno-param-assertions",
"-Xno-call-assertions",
@@ -26,31 +27,9 @@ dependencies {
}
mavenPublishing {
coordinates(property.project.groupName, property.project.yukireflection.core.moduleName, property.project.yukireflection.core.version)
pom {
name = property.project.name
description = property.project.description
url = property.project.url
licenses {
license {
name = property.project.licence.name
url = property.project.licence.url
distribution = property.project.licence.url
}
}
developers {
developer {
id = property.project.developer.id
name = property.project.developer.name
email = property.project.developer.email
}
}
scm {
url = property.maven.publish.scm.url
connection = property.maven.publish.scm.connection
developerConnection = property.maven.publish.scm.developerConnection
}
}
publishToMavenCentral(com.vanniktech.maven.publish.SonatypeHost.S01)
signAllPublications()
coordinates(
groupId = group.toString(),
artifactId = property.project.yukireflection.core.moduleName,
version = version.toString()
)
}