Skip to content

Commit

Permalink
Publish sources + javadocs jars
Browse files Browse the repository at this point in the history
  • Loading branch information
Rongmario committed Feb 15, 2024
1 parent cd55639 commit 1732742
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,24 @@ plugins {
group 'zone.rong'
version '2.0'

java {
withSourcesJar()
withJavadocJar()
}

tasks.withType(JavaExec).configureEach {
jvmArgs '--add-opens=java.base/jdk.internal.reflect=ALL-UNNAMED'
}

tasks.withType(Javadoc).configureEach {
options {
quiet()
setEncoding 'UTF-8'
setSource '11'
addMultilineStringsOption('-add-exports').setValue(['java.base/jdk.internal.reflect=ALL-UNNAMED'])
}
}

tasks.withType(JavaCompile).configureEach {
it.javaCompiler = javaToolchains.compilerFor { JavaToolchainSpec toolchain ->
toolchain.languageVersion = JavaLanguageVersion.of(11)
Expand Down Expand Up @@ -72,6 +86,8 @@ publishing {
publications {
mavenJava(MavenPublication) {
from components.java
sourcesJar
javadocJar
artifactId = 'imaginebreaker'
}
}
Expand Down

0 comments on commit 1732742

Please sign in to comment.