From 35f2aa7d51f75c6784713aeff8a265d37a5ada38 Mon Sep 17 00:00:00 2001 From: PrototypeTrousers Date: Sat, 8 Jul 2023 17:55:40 -0300 Subject: [PATCH] works so... --- build.gradle | 21 ++++++++++++++------- gradle.properties | 4 ++-- gradle/wrapper/gradle-wrapper.properties | 2 +- 3 files changed, 17 insertions(+), 10 deletions(-) diff --git a/build.gradle b/build.gradle index bf90c0710..9931bdf1f 100644 --- a/build.gradle +++ b/build.gradle @@ -71,8 +71,8 @@ if (!getFile(targetPackageJava).exists() && !getFile(targetPackageScala).exists( } if (apiPackage) { - targetPackageJava = 'src/api/java/' + modGroupPath - targetPackageScala = 'src/api/java/' + modGroupPath + targetPackageJava = 'src/api/java/' + modGroupPath + '/api' + targetPackageScala = 'src/api/java/' + modGroupPath + '/api' if (!getFile(targetPackageJava).exists() && !getFile(targetPackageScala).exists()) { throw new GradleException("Could not resolve \"apiPackage\"! Could not find ${targetPackageJava} or ${targetPackageScala}") } @@ -439,9 +439,6 @@ processResources { rename "(${at})", 'META-INF/$1' } } - - from sourceSets.api.output - dependsOn apiClasses } // Automatically generate a mixin json file if it does not already exist @@ -516,16 +513,26 @@ jar { it.isDirectory() ? it : zipTree(it) } } + + from sourceSets.api.output + dependsOn apiClasses + + // specify which files are really included, can control which APIs should be in + include "appeng/**" + include "assets/**" + include "mcmod.info" + include "pack.mcmeta" + include "META-INF/appeng_at.cfg" } // Create API library jar tasks.register('apiJar', Jar) { archiveClassifier.set 'api' - from(sourceSets.main.java) { + from(sourceSets.api.java) { include "${modGroupPath}/${apiPackagePath}/**" } - from(sourceSets.main.output) { + from(sourceSets.api.output) { include "${modGroupPath}/${apiPackagePath}/**" } } diff --git a/gradle.properties b/gradle.properties index 4c43f3e8d..6cd36171b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -44,7 +44,7 @@ modGroup=appeng # This field can be left empty if you want your mod's version to be determined by the latest git tag instead. modVersion=rv6-stable-7-extended_life-v0.55.16 # Whether to use the old jar naming structure (modid-mcversion-version) instead of the new version (modid-version) -includeMCVersionJar=true +includeMCVersionJar=false # The name of your jar when you produce builds, not including any versioning info modArchivesBaseName=appliedenergistics2 # Will update your build.gradle automatically whenever an update is available @@ -68,7 +68,7 @@ gradleTokenVersion=VERSION # In case your mod provides an API for other mods to implement you may declare its package here. Otherwise, you can # leave this property empty. # Example value: apiPackage = api + modGroup = com.myname.mymodid -> com.myname.mymodid.api -apiPackage=true +apiPackage=api # Specify the configuration file for Forge's access transformers here. It must be placed into /src/main/resources/ # There can be multiple files in a comma-separated list. # Example value: mymodid_at.cfg,jei_at.cfg diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 37aef8d3f..8612e3f67 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-all.zip networkTimeout=10000 zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists