Skip to content

Commit

Permalink
chore: update gradle configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
TheFruxz committed Jul 1, 2023
1 parent 03f593c commit 135ddae
Showing 1 changed file with 29 additions and 27 deletions.
56 changes: 29 additions & 27 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ repositories {

dependencies {

@Suppress("DependencyOnStdlib") implementation(kotlin("stdlib"))
testImplementation(kotlin("test"))

implementation("com.github.TheFruxz:Ascend:2023.2")

Expand All @@ -33,26 +33,6 @@ dependencies {

}

java {
sourceCompatibility = VERSION_17
targetCompatibility = VERSION_17
withJavadocJar()
withSourcesJar()
}

tasks {

withType<KotlinCompile> {
kotlinOptions.jvmTarget = "17"
kotlinOptions.freeCompilerArgs += "-opt-in=kotlin.RequiresOptIn"
}

dokkaHtml.configure {
outputDirectory.set(buildDir.resolve("../docs/"))
}

}

val dokkaJavadocJar by tasks.register<Jar>("dokkaJavadocJar") {
dependsOn(tasks.dokkaJavadoc)
from(tasks.dokkaJavadoc.flatMap { it.outputDirectory })
Expand All @@ -65,7 +45,7 @@ val dokkaHtmlJar by tasks.register<Jar>("dokkaHtmlJar") {
archiveClassifier.set("html-doc")
}

val source by tasks.register<Jar>("sourceJar") {
val sourceJar by tasks.register<Jar>("sourceJar") {
from(sourceSets.main.get().allSource)
archiveClassifier.set("sources")
}
Expand All @@ -88,16 +68,38 @@ publishing {
}

publications.create("Stacked", MavenPublication::class) {

from(components["kotlin"])
artifactId = "stacked"
version = version.lowercase()

artifact(dokkaJavadocJar)
artifact(dokkaHtmlJar)
artifact(source)
artifact(sourceJar) {
classifier = "sources"
}

artifactId = "stacked"
version = version.toLowerCase()
from(components["kotlin"])

}

}

tasks {

withType<KotlinCompile> {
kotlinOptions.freeCompilerArgs += "-opt-in=kotlin.RequiresOptIn"
}

dokkaHtml.configure {
outputDirectory.set(buildDir.resolve("../docs/"))
}

}

kotlin {
jvmToolchain(17)
}

java {
sourceCompatibility = VERSION_17
targetCompatibility = VERSION_17
}

0 comments on commit 135ddae

Please sign in to comment.