-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Gradle 8.4, licence headers, GH Action (#6)
- Loading branch information
1 parent
5f7a8bd
commit 440e415
Showing
39 changed files
with
383 additions
and
368 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: Publish | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
build: | ||
uses: MinecraftForge/SharedActions/.github/workflows/gradle.yml@main | ||
with: | ||
java: 8 | ||
gradle_tasks: "publish" | ||
artifact_names: "JarJarMetadata,JarJarFilesystems,JarJarSelector" | ||
secrets: | ||
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} | ||
PROMOTE_ARTIFACT_WEBHOOK: ${{ secrets.PROMOTE_ARTIFACT_WEBHOOK }} | ||
PROMOTE_ARTIFACT_USERNAME: ${{ secrets.PROMOTE_ARTIFACT_USERNAME }} | ||
PROMOTE_ARTIFACT_PASSWORD: ${{ secrets.PROMOTE_ARTIFACT_PASSWORD }} | ||
MAVEN_USER: ${{ secrets.MAVEN_USER }} | ||
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,23 @@ | ||
import net.minecraftforge.gradleutils.PomUtils | ||
|
||
plugins { | ||
id 'net.minecraftforge.gradleutils' | ||
id 'java-library' | ||
id 'maven-publish' | ||
id 'org.cadixdev.licenser' version '0.6.1' | ||
} | ||
|
||
group = 'net.minecraftforge' | ||
version = gradleutils.getTagOffsetVersion() | ||
println('Version: ' + version) | ||
println "Version: $version" | ||
|
||
subprojects { subproject -> | ||
subprojects { Project subproject -> | ||
|
||
subproject.apply plugin: 'java-library' | ||
subproject.apply plugin: 'maven-publish' | ||
subproject.apply { | ||
plugin 'java-library' | ||
plugin 'maven-publish' | ||
plugin 'org.cadixdev.licenser' | ||
} | ||
|
||
subproject.group = 'net.minecraftforge' | ||
subproject.version = rootProject.version | ||
|
@@ -25,42 +31,39 @@ subprojects { subproject -> | |
} | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
maven { | ||
name 'Forge' | ||
url 'https://maven.minecraftforge.net/' | ||
} | ||
} | ||
|
||
java { | ||
toolchain { | ||
languageVersion = JavaLanguageVersion.of(17) | ||
} | ||
withSourcesJar() | ||
} | ||
|
||
project.tasks.withType(JavaCompile).all { | ||
JavaToolchainService service = getProject().getExtensions().getByType(JavaToolchainService.class); | ||
Provider<JavaCompiler> compiler = service.compilerFor(s -> s.getLanguageVersion().set(JavaLanguageVersion.of(8))); | ||
|
||
it.javaCompiler = compiler; | ||
repositories { | ||
mavenCentral() | ||
maven gradleutils.forgeMaven | ||
} | ||
|
||
dependencies { | ||
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: "${junitVersion}" | ||
testRuntimeOnly group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: "${junitVersion}" | ||
testImplementation libs.junit.api | ||
testRuntimeOnly libs.junit.engine | ||
} | ||
|
||
test { | ||
project.tasks.withType(JavaCompile).configureEach { | ||
JavaToolchainService service = project.extensions.getByType(JavaToolchainService) | ||
Provider<JavaCompiler> compiler = service.compilerFor(s -> s.languageVersion.set(JavaLanguageVersion.of(8))) | ||
|
||
javaCompiler = compiler | ||
} | ||
|
||
tasks.named('test', Test).configure { | ||
useJUnitPlatform() | ||
} | ||
|
||
processTestResources { | ||
tasks.named('processTestResources', ProcessResources).configure { | ||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE | ||
} | ||
|
||
jar { | ||
tasks.named('jar', Jar).configure { | ||
manifest { | ||
attributes([ | ||
'Maven-Artifact' : "${project.group}:${project.archivesBaseName}:${project.version}", | ||
|
@@ -70,43 +73,32 @@ subprojects { subproject -> | |
"Implementation-Title" : project.name, | ||
"Implementation-Version" : "${project.version}", | ||
"Implementation-Vendor" : "Minecraft Forge", | ||
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"), | ||
"Automatic-Module-Name" : project.name, | ||
]) | ||
} | ||
} | ||
|
||
license { | ||
header = file('../header.txt') | ||
newLine = false | ||
exclude '**/*.properties' | ||
} | ||
|
||
publishing { | ||
publications { | ||
mavenJava(MavenPublication) { | ||
from components.java | ||
|
||
pom { | ||
name = project.name | ||
description = 'Jar in Jar Utilities including the required NIO FileSystems. SubSystem: ' + project.name | ||
url = 'https://github.com/MinecraftForge/JarJar' | ||
|
||
scm { | ||
url = 'https://github.com/MinecraftForge/JarJar' | ||
connection = 'scm:git:git://github.com/MinecraftForge/JarJar.git' | ||
developerConnection = 'scm:git:[email protected]:MinecraftForge/JarJar.git' | ||
} | ||
|
||
issueManagement { | ||
system = 'github' | ||
url = 'https://github.com/MinecraftForge/JarJar/issues' | ||
} | ||
|
||
licenses { | ||
license { | ||
name = 'LGPL 2.1' | ||
url = 'https://github.com/MinecraftForge/JarJar/blob/main/LICENSE' | ||
distribution = 'repo' | ||
} | ||
} | ||
} | ||
publications.register('mavenJava', MavenPublication) { | ||
from components.java | ||
|
||
pom { | ||
name = project.name | ||
description = 'Jar in Jar Utilities including the required NIO FileSystems. SubSystem: ' + project.name | ||
url = 'https://github.com/MinecraftForge/JarJar' | ||
|
||
PomUtils.setGitHubDetails(pom, 'JarJar') | ||
|
||
license PomUtils.Licenses.LGPLv2_1 | ||
} | ||
} | ||
|
||
repositories { | ||
maven gradleutils.getPublishingForgeMaven() | ||
} | ||
|
@@ -116,4 +108,4 @@ subprojects { subproject -> | |
|
||
changelog { | ||
fromTag '0.3' | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
filesystems/src/binks/java/net/minecraftforge/jarjar/nio/layfs/TestLayeredZipFS.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
filesystems/src/binks/java/net/minecraftforge/jarjar/nio/pathfs/TestPathFS.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
filesystems/src/binks/java/net/minecraftforge/jarjar/nio/pathfs/ZipFsPathFsCompatTests.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
filesystems/src/main/java/net/minecraftforge/jarjar/nio/AbstractPath.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.