Files
2026-09-17 10:37:52 -04:00

73 lines
1.9 KiB
Groovy

plugins {
id 'java'
id 'maven-publish'
}
// TauMC fork of neoforged/JavaSourceTransformer. Upstream derives its version from git tags
// via the gradleutils plugin and publishes to the NeoForged maven and Sonatype Central; this
// fork sets the version by hand (see gradle.properties) and publishes to maven.taumc.org.
group = "org.taumc.jst"
version = jst_version
ext.forkRepo = 'https://github.com/TauMC/JavaSourceTransformer'
println "Version ${project.version}"
subprojects {
group = rootProject.group
version = rootProject.version
apply plugin : "java"
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}
// ensure everything uses UTF-8 and not some random codepage chosen by gradle
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8'
}
plugins.withId('maven-publish') {
publishing.repositories {
maven {
name = 'taumcRepository'
url = uri('https://maven.taumc.org/releases')
credentials {
username = System.getenv('MAVEN_USERNAME')
password = System.getenv('MAVEN_SECRET')
}
}
}
}
}
// Shared pom metadata for the published modules, replacing upstream's gradleutils pomUtils.
ext.taumcPom = { pom ->
pom.url = forkRepo
pom.licenses {
license {
name = 'LGPL-2.1-only'
url = 'https://spdx.org/licenses/LGPL-2.1-only'
}
}
pom.developers {
developer {
id = 'taumc'
name = 'TauMC'
url = 'https://github.com/TauMC'
}
}
pom.scm {
url = forkRepo
connection = "scm:git:${forkRepo}.git"
developerConnection = "scm:git:git@github.com:TauMC/JavaSourceTransformer.git"
}
pom.issueManagement {
system = 'github'
url = "${forkRepo}/issues"
}
}