Skip to content

Commit

Permalink
change: unify access wideners
Browse files Browse the repository at this point in the history
This avoids having separate project-mapped jars for every subproject
that uses access wideners.

But for whatever reasons it still produces a different jar for all
submodules that depends on `:c2me-base`
  • Loading branch information
ishland committed Oct 7, 2023
1 parent b6f6817 commit 084d0d5
Show file tree
Hide file tree
Showing 36 changed files with 48 additions and 116 deletions.
13 changes: 5 additions & 8 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
plugins {
id 'java-library'
id 'fabric-loom' version '1.3-SNAPSHOT' apply false
id 'io.github.juuxel.loom-vineflower' version '1.+' apply false
id 'fabric-loom' version '1.4-SNAPSHOT' apply false
id "me.champeau.jmh" version "0.7.1"
id 'com.modrinth.minotaur' version '2.+' apply false
id 'com.matthewprenger.cursegradle' version '1.4.0' apply false
Expand Down Expand Up @@ -41,7 +40,6 @@ configure (allprojects - project(":tests")) {
if (project != project(":") && project.parent != project(":")) return

apply plugin: 'fabric-loom'
apply plugin: 'io.github.juuxel.loom-quiltflower'
apply plugin: 'maven-publish'

repositories {
Expand All @@ -56,10 +54,9 @@ configure (allprojects - project(":tests")) {
}

loom {
def awFile = file("src/main/resources/${project.name}.accesswidener")
if (awFile.isFile()) {
accessWidenerPath = awFile
}
def file = project(":c2me-base").file("src/main/resources/c2me-base.accesswidener")
accessWidenerPath = file
// logger.lifecycle(String.format("%s: Using access widener at %s", project, file.getAbsolutePath()))
runs {
server {
ideConfigGenerated project.rootProject == project
Expand Down Expand Up @@ -131,7 +128,7 @@ subprojects {
afterEvaluate {
afterEvaluate {
genSourcesWithFernFlower.enabled = false
genSourcesWithQuiltflower.enabled = false
genSourcesWithVineflower.enabled = false
genSourcesWithCfr.enabled = false
downloadAssets.enabled = false
}
Expand Down
41 changes: 39 additions & 2 deletions c2me-base/src/main/resources/c2me-base.accesswidener
Original file line number Diff line number Diff line change
@@ -1,8 +1,45 @@
accessWidener v1 named

accessible class net/minecraft/server/world/ChunkTicketManager$NearbyChunkTicketUpdater
accessible class net/minecraft/server/world/ChunkTicketManager$DistanceFromNearestPlayerTracker
accessible class net/minecraft/server/world/ServerChunkManager$MainThreadExecutor
accessible class net/minecraft/server/world/ThreadedAnvilChunkStorage$TicketManager
accessible class net/minecraft/world/storage/StorageIoWorker$Result
accessible class net/minecraft/world/storage/ChunkStreamVersion$Wrapper
accessible class net/minecraft/world/gen/surfacebuilder/MaterialRules$MaterialRuleContext
accessible class net/minecraft/world/gen/surfacebuilder/MaterialRules$SequenceBlockStateRule
accessible class net/minecraft/world/gen/surfacebuilder/MaterialRules$SequenceMaterialRule
accessible class net/minecraft/world/gen/surfacebuilder/MaterialRules$BlockStateRule
accessible class net/minecraft/world/chunk/ChunkStatus$GenerationTask
accessible class net/minecraft/structure/WoodlandMansionGenerator$FlagMatrix
accessible class net/minecraft/structure/WoodlandMansionGenerator$MansionParameters
accessible class net/minecraft/structure/WoodlandMansionGenerator$GenerationPiece
accessible class net/minecraft/structure/StrongholdGenerator$PieceData
accessible class net/minecraft/structure/StrongholdGenerator$Piece
accessible class net/minecraft/structure/NetherFortressGenerator$PieceData
accessible class net/minecraft/structure/NetherFortressGenerator$Piece
accessible class net/minecraft/structure/OceanMonumentGenerator$PieceSetting
accessible class net/minecraft/client/option/SimpleOption$Callbacks

accessible field net/minecraft/world/storage/StorageIoWorker$Result nbt Lnet/minecraft/nbt/NbtCompound;
accessible field net/minecraft/world/storage/StorageIoWorker$Result future Ljava/util/concurrent/CompletableFuture;
extendable class net/minecraft/client/option/SimpleOption
extendable class net/minecraft/world/storage/RegionBasedStorage

accessible method net/minecraft/util/collection/WeightedList <init> (Ljava/util/List;)V
accessible method net/minecraft/nbt/NbtCompound <init> (Ljava/util/Map;)V
accessible method net/minecraft/nbt/NbtList <init> (Ljava/util/List;B)V
accessible method net/minecraft/world/gen/surfacebuilder/MaterialRules$SequenceBlockStateRule <init> (Ljava/util/List;)V
accessible method net/minecraft/world/storage/ChunkStreamVersion <init> (ILnet/minecraft/world/storage/ChunkStreamVersion$Wrapper;Lnet/minecraft/world/storage/ChunkStreamVersion$Wrapper;)V
accessible method net/minecraft/world/storage/RegionBasedStorage <init> (Ljava/nio/file/Path;Z)V

accessible field net/minecraft/world/storage/StorageIoWorker$Result nbt Lnet/minecraft/nbt/NbtCompound;
accessible field net/minecraft/world/storage/StorageIoWorker$Result future Ljava/util/concurrent/CompletableFuture;
accessible field net/minecraft/util/math/BlockPos BIT_SHIFT_X I
accessible field net/minecraft/util/math/BlockPos SIZE_BITS_X I
accessible field net/minecraft/util/math/BlockPos BIT_SHIFT_Z I
accessible field net/minecraft/util/math/BlockPos SIZE_BITS_Z I
accessible field net/minecraft/util/math/BlockPos BITS_X J
accessible field net/minecraft/util/math/BlockPos BITS_Y J
accessible field net/minecraft/util/math/BlockPos BITS_Z J
accessible field net/minecraft/util/math/noise/SimplexNoiseSampler GRADIENTS [[I
accessible field net/minecraft/world/gen/chunk/AquiferSampler$FluidLevel y I
accessible field net/minecraft/world/gen/chunk/AquiferSampler$FluidLevel state Lnet/minecraft/block/BlockState;

This file was deleted.

1 change: 0 additions & 1 deletion c2me-client-uncapvd/src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
"fabricloader": "*",
"c2me-base": "*"
},
"accessWidener": "c2me-client-uncapvd.accesswidener",

"authors": [
"RelativityMC",
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
"fabricloader": "*",
"c2me-base": "*"
},
"accessWidener": "c2me-fixes-chunkio-threading-issues.accesswidener",

"authors": [
"RelativityMC",
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
"fabricloader": "*",
"c2me-base": "*"
},
"accessWidener": "c2me-fixes-general-threading-issues.accesswidener",

"authors": [
"RelativityMC",
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
"c2me-base": "*",
"c2me-fixes-general-threading-issues": "*"
},
"accessWidener": "c2me-fixes-worldgen-threading-issues.accesswidener",

"authors": [
"RelativityMC",
Expand Down
3 changes: 0 additions & 3 deletions c2me-notickvd/src/main/resources/c2me-notickvd.accesswidener

This file was deleted.

1 change: 0 additions & 1 deletion c2me-notickvd/src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
"fabricloader": "*",
"c2me-base": "*"
},
"accessWidener": "c2me-notickvd.accesswidener",

"authors": [
"RelativityMC",
Expand Down
10 changes: 0 additions & 10 deletions c2me-opts-allocs/src/main/resources/c2me-opts-allocs.accesswidener

This file was deleted.

1 change: 0 additions & 1 deletion c2me-opts-allocs/src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
"fabricloader": "*",
"c2me-base": "*"
},
"accessWidener": "c2me-opts-allocs.accesswidener",

"authors": [
"RelativityMC",
Expand Down

This file was deleted.

1 change: 0 additions & 1 deletion c2me-opts-chunk-access/src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
"fabricloader": "*",
"c2me-base": "*"
},
"accessWidener": "c2me-opts-chunk-access.accesswidener",

"authors": [
"RelativityMC",
Expand Down

This file was deleted.

1 change: 0 additions & 1 deletion c2me-opts-chunkio/src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
"fabricloader": "*",
"c2me-base": "*"
},
"accessWidener": "c2me-opts-chunkio.accesswidener",

"authors": [
"RelativityMC",
Expand Down

This file was deleted.

1 change: 0 additions & 1 deletion c2me-opts-math/src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
"fabricloader": "*",
"c2me-base": "*"
},
"accessWidener": "c2me-opts-math.accesswidener",

"authors": [
"RelativityMC",
Expand Down

This file was deleted.

1 change: 0 additions & 1 deletion c2me-opts-scheduling/src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
"fabricloader": "*",
"c2me-base": "*"
},
"accessWidener": "c2me-opts-scheduling.accesswidener",

"authors": [
"RelativityMC",
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
"fabricloader": "*",
"c2me-base": "*"
},
"accessWidener": "c2me-opts-worldgen-general.accesswidener",

"authors": [
"RelativityMC",
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
"c2me-base": "*",
"c2me-opts-worldgen-general": "*"
},
"accessWidener": "c2me-opts-worldgen-vanilla.accesswidener",

"authors": [
"RelativityMC",
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
"fabricloader": "*",
"c2me-base": "*"
},
"accessWidener": "c2me-rewrites-chunk-serializer.accesswidener",

"authors": [
"RelativityMC",
Expand Down

This file was deleted.

1 change: 0 additions & 1 deletion c2me-rewrites-chunkio/src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
"fabricloader": "*",
"c2me-base": "*"
},
"accessWidener": "c2me-rewrites-chunkio.accesswidener",

"authors": [
"RelativityMC",
Expand Down

This file was deleted.

1 change: 0 additions & 1 deletion c2me-server-utils/src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
"fabricloader": "*",
"c2me-base": "*"
},
"accessWidener": "c2me-server-utils.accesswidener",

"authors": [
"RelativityMC",
Expand Down

This file was deleted.

1 change: 0 additions & 1 deletion c2me-threading-worldgen/src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
"c2me-fixes-worldgen-threading-issues": "*",
"c2me-fixes-worldgen-vanilla-bugs": "*"
},
"accessWidener": "c2me-threading-worldgen.accesswidener",

"authors": [
"RelativityMC",
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
4 changes: 3 additions & 1 deletion tests/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
allprojects {
// apply plugin: 'com.ishland.curseforge.modpackresolver'
apply plugin: 'fabric-loom'
apply plugin: 'io.github.juuxel.loom-quiltflower'
apply plugin: 'java-library'

sourceCompatibility = JavaVersion.VERSION_17
Expand All @@ -25,6 +24,9 @@ allprojects {
content { includeGroup "curse.maven" }
}
}
loom {
accessWidenerPath = project(":c2me-base").file("src/main/resources/c2me-base.accesswidener")
}
afterEvaluate {
migrateMappings.configure {
outputDir = project.file("src/main/java")
Expand Down

0 comments on commit 084d0d5

Please sign in to comment.