Skip to content

Commit 6fcd7af

Browse files
committed
update buildscript
1 parent d8d3059 commit 6fcd7af

File tree

2 files changed

+26
-2
lines changed

2 files changed

+26
-2
lines changed

build.gradle

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//version: 1641429628falsepattern18
1+
//version: 1641429628falsepattern21
22
/*
33
DO NOT CHANGE THIS FILE!
44
@@ -30,9 +30,14 @@ buildscript {
3030
name = "jitpack"
3131
url = "https://jitpack.falsepattern.com/"
3232
}
33+
maven {
34+
name = "mavenpattern"
35+
url = "https://maven.falsepattern.com/"
36+
}
3337
}
3438
dependencies {
3539
classpath 'com.github.GTNewHorizons:ForgeGradle:1.2.6'
40+
classpath 'com.falsepattern:jtweaker:0.2.1'
3641
}
3742
}
3843

@@ -44,7 +49,7 @@ plugins {
4449
id("com.palantir.git-version") version("0.12.3")
4550
id("maven-publish")
4651
}
47-
52+
apply plugin: 'com.falsepattern.jtweaker'
4853
apply plugin: 'forge'
4954

5055
def projectJavaVersion = JavaLanguageVersion.of(8)
@@ -96,6 +101,7 @@ checkPropertyExists("mavenGroupId")
96101
checkPropertyExists("mavenArtifactId")
97102
checkPropertyExists("hasMixinDeps")
98103
checkPropertyExists("mixinPreinitConfig")
104+
checkPropertyExists("remapStubs")
99105

100106

101107
String javaSourceDir = "src/main/java/"
@@ -284,6 +290,9 @@ task relocateShadowJar(type: ConfigureShadowRelocation) {
284290
}
285291

286292
shadowJar {
293+
if (remapStubs.toBoolean()) {
294+
dependsOn(removeStub)
295+
}
287296
project.configurations.shadeCompile.each { dep ->
288297
from(project.zipTree(dep)) {
289298
exclude 'META-INF', 'META-INF/**'
@@ -300,6 +309,9 @@ shadowJar {
300309
}
301310

302311
jar {
312+
if (remapStubs.toBoolean()) {
313+
dependsOn(removeStub)
314+
}
303315
project.configurations.shadeCompile.each { dep ->
304316
from(project.zipTree(dep)) {
305317
exclude 'META-INF', 'META-INF/**'
@@ -456,6 +468,9 @@ task sourcesJar(type: Jar) {
456468
}
457469

458470
task shadowDevJar(type: ShadowJar) {
471+
if (remapStubs.toBoolean()) {
472+
dependsOn(removeStub)
473+
}
459474
project.configurations.shadeCompile.each { dep ->
460475
from(project.zipTree(dep)) {
461476
exclude 'META-INF', 'META-INF/**'
@@ -485,6 +500,9 @@ task circularResolverJar(type: Jar) {
485500
}
486501

487502
task devJar(type: Jar) {
503+
if (remapStubs.toBoolean()) {
504+
dependsOn(removeStub)
505+
}
488506
project.configurations.shadeCompile.each { dep ->
489507
from(project.zipTree(dep)) {
490508
exclude 'META-INF', 'META-INF/**'

gradle.properties

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,12 @@ containsMixinsAndOrCoreModOnly = false
8282
# responsibility check the licence and request permission for distribution, if required.
8383
usesShadowedDependencies = false
8484

85+
# If enabled, class stubbing will be enabled. In this mode, all classes with a package named "stubpackage" in their
86+
# path will be removed, and all classes that refer to said classes will be modified so that the "stubpackage" will map
87+
# to the root package instead. This is useful for referring to compile-time inaccessible classes, such as classes in the
88+
# default package
89+
remapStubs = false
90+
8591
# Optional parameter to customize the produced artifacts. Use this to preserver artifact naming when migrating older
8692
# projects. New projects should not use this parameter.
8793
#customArchiveBaseName =

0 commit comments

Comments
 (0)