mirror of
https://github.com/architectury/architectury-loom.git
synced 2026-03-28 04:07:01 -05:00
Test against Gradle 8.1 and 8.2 nightly. (#846)
This commit is contained in:
10
.github/workflows/test-push.yml
vendored
10
.github/workflows/test-push.yml
vendored
@@ -66,6 +66,11 @@ jobs:
|
||||
with:
|
||||
name: ${{ steps.test.outputs.test }} Results
|
||||
path: build/reports/
|
||||
- uses: actions/upload-artifact@v3
|
||||
if: ${{ failure() }}
|
||||
with:
|
||||
name: ${{ steps.test.outputs.test }} Heap Dump
|
||||
path: "*.hprof"
|
||||
|
||||
run_tests_windows:
|
||||
needs: prepare_test_matrix
|
||||
@@ -95,6 +100,11 @@ jobs:
|
||||
with:
|
||||
name: ${{ steps.test.outputs.test }} (${{ matrix.java }}) Results (Windows)
|
||||
path: build/reports/
|
||||
- uses: actions/upload-artifact@v3
|
||||
if: ${{ failure() }}
|
||||
with:
|
||||
name: ${{ steps.test.outputs.test }} Heap Dump (Windows)
|
||||
path: "*.hprof"
|
||||
|
||||
# Special case this test to run across all os's
|
||||
reproducible_build_test:
|
||||
|
||||
@@ -293,11 +293,7 @@ task writeActionsTestMatrix() {
|
||||
}
|
||||
|
||||
def className = it.name.replace(".groovy", "")
|
||||
|
||||
// Disabled for CI, as it fails too much.
|
||||
if (className.endsWith("DecompileTest")) return
|
||||
|
||||
testMatrix.add("net.fabricmc.loom.test.integration.${className}")
|
||||
testMatrix.add("net.fabricmc.loom.test.integration.${className}")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -192,6 +192,7 @@ public abstract class GenerateSourcesTask extends AbstractLoomTask {
|
||||
|
||||
return getWorkerExecutor().processIsolation(spec -> {
|
||||
spec.forkOptions(forkOptions -> {
|
||||
forkOptions.setMinHeapSize("512m");
|
||||
forkOptions.setMaxHeapSize(String.format(Locale.ENGLISH, "%dm", decompilerOptions.getMemory().get()));
|
||||
forkOptions.systemProperty(WorkerDaemonClientsManagerHelper.MARKER_PROP, jvmMarkerValue);
|
||||
});
|
||||
|
||||
@@ -27,13 +27,13 @@ package net.fabricmc.loom.test
|
||||
import org.gradle.util.GradleVersion
|
||||
|
||||
class LoomTestConstants {
|
||||
private final static String NIGHTLY_VERSION = "8.1-20230217231705+0000"
|
||||
private final static String NIGHTLY_VERSION = "8.2-20230415221329+0000"
|
||||
private final static boolean NIGHTLY_EXISTS = nightlyExists(NIGHTLY_VERSION)
|
||||
|
||||
// Test against the version of Gradle being used to build loom
|
||||
public final static String DEFAULT_GRADLE = GradleVersion.current().getVersion()
|
||||
// Test against Gradle 8
|
||||
public final static String GRADLE_8 = "8.0.1"
|
||||
public final static String GRADLE_8 = "8.1"
|
||||
// Tests that depend specifically on the nightly will run on the current version when the nightly is not available.
|
||||
public final static String PRE_RELEASE_GRADLE = NIGHTLY_EXISTS ? NIGHTLY_VERSION : DEFAULT_GRADLE
|
||||
// Randomly sorted to ensure that all versions can run with a clean gradle home.
|
||||
|
||||
@@ -41,6 +41,12 @@ class MixinApAutoRefmapTest extends Specification implements GradleProjectTestTr
|
||||
setup:
|
||||
def gradle = gradleProject(project: "mixinApAutoRefmap", version: version)
|
||||
|
||||
if (!version.startsWith("7")) {
|
||||
// Update the shadow plugin on Gradle 8
|
||||
// TODO Gradle 8, move to the test build.gradle.
|
||||
gradle.buildGradle.text = gradle.buildGradle.text.replace("'7.0.0'", "'8.1.1'")
|
||||
}
|
||||
|
||||
when:
|
||||
def result = gradle.run(task: "build")
|
||||
|
||||
|
||||
@@ -272,7 +272,7 @@ trait GradleProjectTestTrait {
|
||||
'''
|
||||
|
||||
// Patch the new plugin into the end of the plugins block
|
||||
def matcher = buildGradle.text =~ /(?s)plugins \{(?<ids>.*)}/
|
||||
def matcher = buildGradle.text =~ /(?s)plugins \{(?<ids>.*?)}/
|
||||
assert matcher.find()
|
||||
def ids = matcher.group("ids")
|
||||
|
||||
@@ -283,7 +283,7 @@ trait GradleProjectTestTrait {
|
||||
}
|
||||
"""
|
||||
|
||||
buildGradle.text = buildGradle.text.replaceAll("(?s)(plugins \\{.*})", pluginBlock)
|
||||
buildGradle.text = buildGradle.text.replaceAll("(?s)(plugins \\{.*?})", pluginBlock)
|
||||
|
||||
def sourceSrc = new File("src/test/groovy/net/fabricmc/loom/test/integration/buildSrc/" + name)
|
||||
def targetSrc = new File(buildSrcDir, "src/main/groovy/net/fabricmc/loom/test/integration/buildSrc/" + name)
|
||||
|
||||
@@ -3,10 +3,6 @@ plugins {
|
||||
id 'maven-publish'
|
||||
}
|
||||
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
|
||||
archivesBaseName = project.archives_base_name
|
||||
version = project.mod_version
|
||||
group = project.maven_group
|
||||
|
||||
@@ -35,6 +31,10 @@ dependencies {
|
||||
// You may need to force-disable transitiveness on them.
|
||||
}
|
||||
|
||||
base {
|
||||
archivesName = project.archives_base_name
|
||||
}
|
||||
|
||||
processResources {
|
||||
inputs.property "version", project.version
|
||||
|
||||
@@ -64,6 +64,9 @@ java {
|
||||
// if it is present.
|
||||
// If you remove this line, sources will not be generated.
|
||||
withSourcesJar()
|
||||
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
jar {
|
||||
|
||||
@@ -3,10 +3,6 @@ plugins {
|
||||
id 'maven-publish'
|
||||
}
|
||||
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
|
||||
archivesBaseName = project.archives_base_name
|
||||
version = project.mod_version
|
||||
group = project.maven_group
|
||||
|
||||
@@ -31,6 +27,10 @@ dependencies {
|
||||
// You may need to force-disable transitiveness on them.
|
||||
}
|
||||
|
||||
base {
|
||||
archivesName = project.archives_base_name
|
||||
}
|
||||
|
||||
processResources {
|
||||
inputs.property "version", project.version
|
||||
|
||||
@@ -60,6 +60,9 @@ java {
|
||||
// if it is present.
|
||||
// If you remove this line, sources will not be generated.
|
||||
withSourcesJar()
|
||||
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
jar {
|
||||
|
||||
@@ -3,10 +3,6 @@ plugins {
|
||||
id 'maven-publish'
|
||||
}
|
||||
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
|
||||
archivesBaseName = project.archives_base_name
|
||||
version = project.mod_version
|
||||
group = project.maven_group
|
||||
|
||||
@@ -31,6 +27,10 @@ dependencies {
|
||||
// You may need to force-disable transitiveness on them.
|
||||
}
|
||||
|
||||
base {
|
||||
archivesName = project.archives_base_name
|
||||
}
|
||||
|
||||
processResources {
|
||||
inputs.property "version", project.version
|
||||
|
||||
@@ -60,6 +60,9 @@ java {
|
||||
// if it is present.
|
||||
// If you remove this line, sources will not be generated.
|
||||
withSourcesJar()
|
||||
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
jar {
|
||||
|
||||
@@ -5,7 +5,6 @@ plugins {
|
||||
id 'maven-publish'
|
||||
}
|
||||
|
||||
archivesBaseName = "fabric-example-mod"
|
||||
version = "1.0.0"
|
||||
group = "com.example"
|
||||
|
||||
@@ -17,4 +16,8 @@ dependencies {
|
||||
// I-faces will still be applied as the jar is on both configurations.
|
||||
modCompileOnly files("dummy.jar")
|
||||
modRuntimeOnly files("dummy.jar")
|
||||
}
|
||||
|
||||
base {
|
||||
archivesName = "fabric-example-mod"
|
||||
}
|
||||
@@ -3,10 +3,10 @@ plugins {
|
||||
id 'maven-publish'
|
||||
}
|
||||
|
||||
sourceCompatibility = JavaVersion.VERSION_16
|
||||
targetCompatibility = JavaVersion.VERSION_16
|
||||
base {
|
||||
archivesName = project.archives_base_name
|
||||
}
|
||||
|
||||
archivesBaseName = project.archives_base_name
|
||||
version = project.mod_version
|
||||
group = project.maven_group
|
||||
|
||||
@@ -29,4 +29,6 @@ tasks.withType(JavaCompile).configureEach {
|
||||
|
||||
java {
|
||||
withSourcesJar()
|
||||
sourceCompatibility = JavaVersion.VERSION_16
|
||||
targetCompatibility = JavaVersion.VERSION_16
|
||||
}
|
||||
|
||||
@@ -2,10 +2,6 @@ plugins {
|
||||
id 'fabric-loom'
|
||||
}
|
||||
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
|
||||
archivesBaseName = project.archives_base_name
|
||||
version = project.mod_version
|
||||
group = project.maven_group
|
||||
|
||||
@@ -16,6 +12,10 @@ dependencies {
|
||||
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
|
||||
}
|
||||
|
||||
base {
|
||||
archivesName = project.archives_base_name
|
||||
}
|
||||
|
||||
processResources {
|
||||
inputs.property "version", project.version
|
||||
|
||||
@@ -33,10 +33,13 @@ java {
|
||||
// if it is present.
|
||||
// If you remove this line, sources will not be generated.
|
||||
withSourcesJar()
|
||||
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
jar {
|
||||
from("LICENSE") {
|
||||
rename { "${it}_${project.archivesBaseName}"}
|
||||
rename { "${it}_${base.archivesName.get()}"}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,10 +3,6 @@ plugins {
|
||||
id 'maven-publish'
|
||||
}
|
||||
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
|
||||
archivesBaseName = project.archives_base_name
|
||||
version = project.mod_version
|
||||
group = project.maven_group
|
||||
|
||||
@@ -39,6 +35,10 @@ dependencies {
|
||||
// You may need to force-disable transitiveness on them.
|
||||
}
|
||||
|
||||
base {
|
||||
archivesName = project.archives_base_name
|
||||
}
|
||||
|
||||
processResources {
|
||||
inputs.property "version", project.version
|
||||
|
||||
@@ -68,11 +68,14 @@ java {
|
||||
// if it is present.
|
||||
// If you remove this line, sources will not be generated.
|
||||
withSourcesJar()
|
||||
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
jar {
|
||||
from("LICENSE") {
|
||||
rename { "${it}_${project.archivesBaseName}"}
|
||||
rename { "${it}_${base.archivesName.get()}"}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,10 +3,6 @@ plugins {
|
||||
id 'maven-publish'
|
||||
}
|
||||
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
|
||||
archivesBaseName = project.archives_base_name
|
||||
version = loom.modVersion
|
||||
group = project.maven_group
|
||||
|
||||
@@ -32,6 +28,10 @@ dependencies {
|
||||
// You may need to force-disable transitiveness on them.
|
||||
}
|
||||
|
||||
base {
|
||||
archivesName = project.archives_base_name
|
||||
}
|
||||
|
||||
tasks.withType(JavaCompile).configureEach {
|
||||
// ensure that the encoding is set to UTF-8, no matter what the system default is
|
||||
// this fixes some edge cases with special characters not displaying correctly
|
||||
@@ -53,11 +53,14 @@ java {
|
||||
// if it is present.
|
||||
// If you remove this line, sources will not be generated.
|
||||
withSourcesJar()
|
||||
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
jar {
|
||||
from("LICENSE") {
|
||||
rename { "${it}_${project.archivesBaseName}"}
|
||||
rename { "${it}_${base.archivesName.get()}"}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
package net.fabricmc.example.test;
|
||||
|
||||
import net.fabricmc.api.ModInitializer;
|
||||
import net.minecraft.client.gui.screen.TitleScreen;
|
||||
|
||||
// Just a simple class to ensure the tests can compile against loader and minecraft
|
||||
public class ExampleMod implements ModInitializer {
|
||||
@Override
|
||||
public void onInitialize() {
|
||||
TitleScreen screen = null;
|
||||
}
|
||||
}
|
||||
@@ -3,12 +3,9 @@ plugins {
|
||||
id 'maven-publish'
|
||||
}
|
||||
|
||||
archivesBaseName = "fabric-example-mod"
|
||||
version = "1.0.0"
|
||||
group = "com.example"
|
||||
|
||||
println archivesBaseName
|
||||
|
||||
repositories {
|
||||
maven {
|
||||
url = "http://localhost:${System.getProperty("loom.test.mavenPort")}/"
|
||||
@@ -29,6 +26,10 @@ dependencies {
|
||||
testConfig System.getProperty("loom.test.resolve")
|
||||
}
|
||||
|
||||
base {
|
||||
archivesName = "fabric-example-mod"
|
||||
}
|
||||
|
||||
task checkClasspaths {
|
||||
// Check that only compileClasspath contains the biome API and only runtimeClasspath contains the command API.
|
||||
// See https://github.com/FabricMC/fabric-loom/issues/801.
|
||||
|
||||
@@ -3,12 +3,9 @@ plugins {
|
||||
id 'maven-publish'
|
||||
}
|
||||
|
||||
archivesBaseName = "fabric-example-lib"
|
||||
version = System.getProperty("loom.test.version")
|
||||
group = "com.example"
|
||||
|
||||
println archivesBaseName
|
||||
|
||||
dependencies {
|
||||
minecraft "com.mojang:minecraft:1.16.5"
|
||||
mappings "net.fabricmc:yarn:1.16.5+build.5:v2"
|
||||
@@ -17,6 +14,10 @@ dependencies {
|
||||
modRuntimeOnly fabricApi.module('fabric-command-api-v1', '0.42.0+1.16')
|
||||
}
|
||||
|
||||
base {
|
||||
archivesName = "fabric-example-lib"
|
||||
}
|
||||
|
||||
processResources {
|
||||
inputs.property "version", project.version
|
||||
|
||||
|
||||
@@ -5,6 +5,9 @@ plugins {
|
||||
id 'maven-publish'
|
||||
}
|
||||
|
||||
archivesBaseName = "fabric-example-mod"
|
||||
version = "1.0.0"
|
||||
group = "com.example"
|
||||
group = "com.example"
|
||||
|
||||
base {
|
||||
archivesName = "fabric-example-mod"
|
||||
}
|
||||
@@ -4,10 +4,6 @@ plugins {
|
||||
id 'maven-publish'
|
||||
}
|
||||
|
||||
sourceCompatibility = JavaVersion.VERSION_16
|
||||
targetCompatibility = JavaVersion.VERSION_16
|
||||
|
||||
archivesBaseName = project.archives_base_name
|
||||
version = project.mod_version
|
||||
group = project.maven_group
|
||||
|
||||
@@ -32,6 +28,10 @@ dependencies {
|
||||
// You may need to force-disable transitiveness on them.
|
||||
}
|
||||
|
||||
base {
|
||||
archivesName = project.archives_base_name
|
||||
}
|
||||
|
||||
sourceSets.register("mixin") {
|
||||
it.compileClasspath += sourceSets["main"].compileClasspath
|
||||
it.runtimeClasspath += sourceSets["main"].runtimeClasspath
|
||||
@@ -65,6 +65,9 @@ java {
|
||||
// if it is present.
|
||||
// If you remove this line, sources will not be generated.
|
||||
withSourcesJar()
|
||||
|
||||
sourceCompatibility = JavaVersion.VERSION_16
|
||||
targetCompatibility = JavaVersion.VERSION_16
|
||||
}
|
||||
|
||||
loom {
|
||||
@@ -96,7 +99,7 @@ remapJar {
|
||||
|
||||
jar {
|
||||
from("LICENSE") {
|
||||
rename { "${it}_${project.archivesBaseName}"}
|
||||
rename { "${it}_${base.archivesName.get()}"}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,10 +3,6 @@ plugins {
|
||||
id 'maven-publish'
|
||||
}
|
||||
|
||||
sourceCompatibility = JavaVersion.VERSION_16
|
||||
targetCompatibility = JavaVersion.VERSION_16
|
||||
|
||||
archivesBaseName = project.archives_base_name
|
||||
version = project.mod_version
|
||||
group = project.maven_group
|
||||
|
||||
@@ -31,6 +27,10 @@ dependencies {
|
||||
// You may need to force-disable transitiveness on them.
|
||||
}
|
||||
|
||||
base {
|
||||
archivesName = project.archives_base_name
|
||||
}
|
||||
|
||||
sourceSets.register("mixin") {
|
||||
it.compileClasspath += sourceSets["main"].compileClasspath
|
||||
it.runtimeClasspath += sourceSets["main"].runtimeClasspath
|
||||
@@ -64,6 +64,9 @@ java {
|
||||
// if it is present.
|
||||
// If you remove this line, sources will not be generated.
|
||||
withSourcesJar()
|
||||
|
||||
sourceCompatibility = JavaVersion.VERSION_16
|
||||
targetCompatibility = JavaVersion.VERSION_16
|
||||
}
|
||||
|
||||
loom {
|
||||
@@ -82,7 +85,7 @@ loom {
|
||||
|
||||
jar {
|
||||
from("LICENSE") {
|
||||
rename { "${it}_${project.archivesBaseName}"}
|
||||
rename { "${it}_${base.archivesName.get()}"}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@ plugins {
|
||||
id 'maven-publish'
|
||||
}
|
||||
|
||||
archivesBaseName = "fabric-example-mod"
|
||||
version = "1.0.0"
|
||||
group = "com.example"
|
||||
|
||||
@@ -15,4 +14,8 @@ dependencies {
|
||||
modImplementation "net.fabricmc:fabric-loader:0.11.6"
|
||||
|
||||
modImplementation files("dummy.jar")
|
||||
}
|
||||
|
||||
base {
|
||||
archivesName = "fabric-example-mod"
|
||||
}
|
||||
@@ -3,10 +3,6 @@ plugins {
|
||||
id 'maven-publish'
|
||||
}
|
||||
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
|
||||
archivesBaseName = project.archives_base_name
|
||||
version = project.mod_version
|
||||
group = project.maven_group
|
||||
|
||||
@@ -31,6 +27,10 @@ dependencies {
|
||||
// You may need to force-disable transitiveness on them.
|
||||
}
|
||||
|
||||
base {
|
||||
archivesName = project.archives_base_name
|
||||
}
|
||||
|
||||
processResources {
|
||||
inputs.property "version", project.version
|
||||
|
||||
@@ -60,11 +60,14 @@ java {
|
||||
// if it is present.
|
||||
// If you remove this line, sources will not be generated.
|
||||
withSourcesJar()
|
||||
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
jar {
|
||||
from("LICENSE") {
|
||||
rename { "${it}_${project.archivesBaseName}"}
|
||||
rename { "${it}_${base.archivesName.get()}"}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -21,7 +21,9 @@ def getMappingVersion(String mcVersion) {
|
||||
subprojects {
|
||||
apply plugin: "fabric-loom"
|
||||
|
||||
archivesBaseName = rootProject.name + "-" + project.name
|
||||
base {
|
||||
archivesName = rootProject.name + "-" + project.name
|
||||
}
|
||||
|
||||
def minecraft_version = project.name.substring(7)
|
||||
def yarn_mappings = getMappingVersion(minecraft_version)
|
||||
|
||||
@@ -64,5 +64,7 @@ dependencies {
|
||||
include fabricApi.module("fabric-api-base", "0.31.0+1.16")
|
||||
}
|
||||
|
||||
archivesBaseName = "multiproject"
|
||||
base {
|
||||
archivesName = "multiproject"
|
||||
}
|
||||
version = "1.0.0"
|
||||
@@ -1,4 +1,6 @@
|
||||
archivesBaseName = "core"
|
||||
base {
|
||||
archivesName = "core"
|
||||
}
|
||||
|
||||
loom {
|
||||
accessWidenerPath = file("src/main/resources/core.accesswidener")
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
archivesBaseName = "example"
|
||||
base {
|
||||
archivesName = "example"
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation project(path: ":core", configuration: "namedElements")
|
||||
|
||||
@@ -3,10 +3,6 @@ plugins {
|
||||
id 'maven-publish'
|
||||
}
|
||||
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
|
||||
archivesBaseName = project.archives_base_name
|
||||
version = project.mod_version
|
||||
group = project.maven_group
|
||||
|
||||
@@ -22,6 +18,10 @@ dependencies {
|
||||
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
|
||||
}
|
||||
|
||||
base {
|
||||
archivesName = project.archives_base_name
|
||||
}
|
||||
|
||||
processResources {
|
||||
inputs.property "version", project.version
|
||||
|
||||
@@ -41,11 +41,14 @@ tasks.withType(JavaCompile).configureEach {
|
||||
|
||||
java {
|
||||
withSourcesJar()
|
||||
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
jar {
|
||||
from("LICENSE") {
|
||||
rename { "${it}_${project.archivesBaseName}"}
|
||||
rename { "${it}_${base.archivesName.get()}"}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -27,11 +27,14 @@ loom {
|
||||
}
|
||||
}
|
||||
|
||||
archivesBaseName = "fabric-example-mod"
|
||||
version = "1.0.0"
|
||||
|
||||
dependencies {
|
||||
minecraft "com.mojang:minecraft:1.18.1"
|
||||
mappings "net.fabricmc:yarn:1.18.1+build.12:v2"
|
||||
modImplementation "net.fabricmc:fabric-loader:0.12.12"
|
||||
}
|
||||
|
||||
base {
|
||||
archivesName = "fabric-example-mod"
|
||||
}
|
||||
@@ -4,7 +4,6 @@ plugins {
|
||||
id 'signing'
|
||||
}
|
||||
|
||||
archivesBaseName = "fabric-example-lib"
|
||||
version = "1.0.0"
|
||||
group = "com.example"
|
||||
|
||||
@@ -14,6 +13,10 @@ dependencies {
|
||||
modImplementation "net.fabricmc:fabric-loader:0.11.2"
|
||||
}
|
||||
|
||||
base {
|
||||
archivesName = "fabric-example-lib"
|
||||
}
|
||||
|
||||
processResources {
|
||||
inputs.property "version", project.version
|
||||
|
||||
|
||||
@@ -3,10 +3,6 @@ plugins {
|
||||
id 'maven-publish'
|
||||
}
|
||||
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
|
||||
archivesBaseName = project.archives_base_name
|
||||
version = loom.modVersion
|
||||
group = project.maven_group
|
||||
|
||||
@@ -34,6 +30,14 @@ dependencies {
|
||||
include "org.xerial:sqlite-jdbc:3.36.0.3"
|
||||
}
|
||||
|
||||
test {
|
||||
enabled = false
|
||||
}
|
||||
|
||||
base {
|
||||
archivesName = project.archives_base_name
|
||||
}
|
||||
|
||||
tasks.withType(JavaCompile).configureEach {
|
||||
// ensure that the encoding is set to UTF-8, no matter what the system default is
|
||||
// this fixes some edge cases with special characters not displaying correctly
|
||||
@@ -55,11 +59,14 @@ java {
|
||||
// if it is present.
|
||||
// If you remove this line, sources will not be generated.
|
||||
withSourcesJar()
|
||||
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
jar {
|
||||
from("LICENSE") {
|
||||
rename { "${it}_${project.archivesBaseName}"}
|
||||
rename { "${it}_${base.archivesName.get()}"}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,8 +3,6 @@ plugins {
|
||||
id 'maven-publish'
|
||||
}
|
||||
|
||||
sourceCompatibility = JavaVersion.VERSION_17
|
||||
targetCompatibility = JavaVersion.VERSION_17
|
||||
|
||||
configurations {
|
||||
shade
|
||||
@@ -39,4 +37,7 @@ tasks.withType(JavaCompile).configureEach {
|
||||
|
||||
java {
|
||||
withSourcesJar()
|
||||
|
||||
sourceCompatibility = JavaVersion.VERSION_17
|
||||
targetCompatibility = JavaVersion.VERSION_17
|
||||
}
|
||||
@@ -5,7 +5,6 @@ plugins {
|
||||
id 'maven-publish'
|
||||
}
|
||||
|
||||
archivesBaseName = "fabric-example-mod"
|
||||
version = "1.0.0"
|
||||
group = "com.example"
|
||||
|
||||
@@ -15,4 +14,8 @@ dependencies {
|
||||
modImplementation "net.fabricmc:fabric-loader:0.11.6"
|
||||
|
||||
modImplementation files("dummy.jar")
|
||||
}
|
||||
|
||||
base {
|
||||
archivesName = "fabric-example-mod"
|
||||
}
|
||||
Reference in New Issue
Block a user