Skip to content

Commit

Permalink
fix apiJar and sourcesJar
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMCLoveMan committed Mar 11, 2024
1 parent 400784a commit 6793482
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,13 @@ base {
archivesName = archive_base
}

java.toolchain.languageVersion = JavaLanguageVersion.of(17)
java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}

withSourcesJar()
}

minecraft {
mappings channel: mappings_channel, version: mappings_version
Expand Down Expand Up @@ -145,23 +151,22 @@ jar {
exclude('.cache/**')
}

tasks.register('sourcesJar', Jar) {
duplicatesStrategy = DuplicatesStrategy.INCLUDE
archiveAppendix.set(minecraft_version)
archiveClassifier.set('sources')
from sourceSets.main.allJava
sourcesJar {
archiveAppendix = minecraft_version
include('net/themcbrothers/**')
}

tasks.register('apiJar', Jar) {
archiveAppendix = minecraft_version
archiveClassifier = 'api'
from sourceSets.main.allJava
from sourceSets.main.output
include 'net/themcbrothers/interiormod/api/**'
}

artifacts {
archives sourcesJar
archives apiJar
archives jar
archives sourcesJar
}

jar.finalizedBy('reobfJar')
Expand Down

0 comments on commit 6793482

Please sign in to comment.