Skip to content

Commit

Permalink
change build script
Browse files Browse the repository at this point in the history
  • Loading branch information
chrimaeon committed Nov 11, 2022
1 parent dced64d commit 135cbdf
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ idea {
}

java {
withSourcesJar()
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
Expand Down Expand Up @@ -95,11 +96,6 @@ gradlePlugin {
testSourceSets(functionalTestSourceSet)
}

val sourcesJar by tasks.registering(Jar::class) {
archiveClassifier.set("sources")
from(sourceSets.main.get().allSource)
}

val javadocJar by tasks.registering(Jar::class) {
archiveClassifier.set("javadoc")
from(tasks.dokkaJavadoc)
Expand All @@ -108,10 +104,6 @@ val javadocJar by tasks.registering(Jar::class) {
publishing {
publications {
register<MavenPublication>("pluginMaven") {
// component registered by gradle-plugin plugin
artifact(sourcesJar.get())
artifact(javadocJar.get())

val pomArtifactId: String by pomProperties

artifactId = pomArtifactId
Expand Down Expand Up @@ -158,7 +150,9 @@ publishing {
val credentials = Properties().apply {
val credFile = projectDir.resolve("credentials.properties")
if (credFile.exists()) {
load(credFile.inputStream())
credFile.inputStream().use {
load(it)
}
}
}
credentials {
Expand Down

0 comments on commit 135cbdf

Please sign in to comment.