Skip to content

Commit 6978fbc

Browse files
authored
Merge pull request #12 from MrKono/1.2.3
1.2.3
2 parents f95512f + be55b0d commit 6978fbc

36 files changed

+632
-439
lines changed

ChangeLog.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,15 @@
11
# ChangeLog (更新履歴)
2+
## v 1.2.3
3+
**_EN_** <br>
4+
**Update**<br>
5+
***GTCEu 2.8.6-beta -> 2.8.8-beta***<br>
6+
***GCYM 1.2.7 -> 1.2.8***<br>
7+
8+
**_JP_** <br>
9+
**Update**<br>
10+
***GTCEu 2.8.6-beta -> 2.8.8-beta***<br>
11+
***GCYM 1.2.7 -> 1.2.8***<br>
12+
----------
213
## v 1.2.2
314
**_EN_** <br>
415
**Update**<br>

VersionInformation.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Corresponding Version Information / 対応バージョン情報
22
| MaterialReplication | GTCEu |
33
|---------------------|------------|
4+
| 1.2.3 | 2.8.8-beta |
45
| 1.2.2 | 2.8.6-beta |
56
| 1.2.0 <br> 1.2.1 | 2.8.1-bata |
67
| 1.1.1 | 2.7.4-beta |

build.gradle

Lines changed: 119 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//version: 1700970468
1+
//version: 1707682661
22
/*
33
* DO NOT CHANGE THIS FILE!
44
* Also, you may replace this file at any time if there is an update available.
@@ -24,9 +24,9 @@ plugins {
2424
id 'eclipse'
2525
id 'maven-publish'
2626
id 'org.jetbrains.gradle.plugin.idea-ext' version '1.1.7'
27-
id 'com.gtnewhorizons.retrofuturagradle' version '1.3.25'
28-
id 'net.darkhax.curseforgegradle' version '1.1.17' apply false
29-
id 'com.modrinth.minotaur' version '2.8.6' apply false
27+
id 'com.gtnewhorizons.retrofuturagradle' version '1.3.33'
28+
id 'net.darkhax.curseforgegradle' version '1.1.18' apply false
29+
id 'com.modrinth.minotaur' version '2.8.7' apply false
3030
id 'com.diffplug.spotless' version '6.13.0' apply false
3131
id 'com.palantir.git-version' version '3.0.0' apply false
3232
id 'com.github.johnrengelman.shadow' version '8.1.1' apply false
@@ -62,6 +62,7 @@ propertyDefaultIfUnset("generateGradleTokenClass", "")
6262
propertyDefaultIfUnset("gradleTokenModId", "")
6363
propertyDefaultIfUnset("gradleTokenModName", "")
6464
propertyDefaultIfUnset("gradleTokenVersion", "")
65+
propertyDefaultIfUnset("useSrcApiPath", false)
6566
propertyDefaultIfUnset("includeWellKnownRepositories", true)
6667
propertyDefaultIfUnset("includeCommonDevEnvMods", true)
6768
propertyDefaultIfUnset("noPublishedSources", false)
@@ -72,13 +73,15 @@ propertyDefaultIfUnset("usesShadowedDependencies", false)
7273
propertyDefaultIfUnset("minimizeShadowedDependencies", true)
7374
propertyDefaultIfUnset("relocateShadowedDependencies", true)
7475
propertyDefaultIfUnset("separateRunDirectories", false)
76+
propertyDefaultIfUnset("versionDisplayFormat", '$MOD_NAME \u2212 $VERSION')
7577
propertyDefaultIfUnsetWithEnvVar("modrinthProjectId", "", "MODRINTH_PROJECT_ID")
7678
propertyDefaultIfUnset("modrinthRelations", "")
7779
propertyDefaultIfUnsetWithEnvVar("curseForgeProjectId", "", "CURSEFORGE_PROJECT_ID")
7880
propertyDefaultIfUnset("curseForgeRelations", "")
7981
propertyDefaultIfUnsetWithEnvVar("releaseType", "release", "RELEASE_TYPE")
8082
propertyDefaultIfUnset("generateDefaultChangelog", false)
8183
propertyDefaultIfUnset("customMavenPublishUrl", "")
84+
propertyDefaultIfUnset("mavenArtifactGroup", getDefaultArtifactGroup())
8285
propertyDefaultIfUnset("enableModernJavaSyntax", false)
8386
propertyDefaultIfUnset("enableSpotless", false)
8487
propertyDefaultIfUnset("enableJUnit", false)
@@ -103,9 +106,16 @@ if (!getFile(targetPackageJava).exists() && !getFile(targetPackageScala).exists(
103106
}
104107

105108
if (apiPackage) {
106-
targetPackageJava = javaSourceDir + modGroupPath + '/' + apiPackagePath
107-
targetPackageScala = scalaSourceDir + modGroupPath + '/' + apiPackagePath
108-
targetPackageKotlin = kotlinSourceDir + modGroupPath + '/' + apiPackagePath
109+
final String endApiPath = modGroupPath + '/' + apiPackagePath
110+
if (useSrcApiPath) {
111+
targetPackageJava = 'src/api/java/' + endApiPath
112+
targetPackageScala = 'src/api/scala/' + endApiPath
113+
targetPackageKotlin = 'src/api/kotlin/' + endApiPath
114+
} else {
115+
targetPackageJava = javaSourceDir + endApiPath
116+
targetPackageScala = scalaSourceDir + endApiPath
117+
targetPackageKotlin = kotlinSourceDir + endApiPath
118+
}
109119
if (!getFile(targetPackageJava).exists() && !getFile(targetPackageScala).exists() && !getFile(targetPackageKotlin).exists()) {
110120
throw new GradleException("Could not resolve \"apiPackage\"! Could not find ${targetPackageJava} or ${targetPackageScala} or ${targetPackageKotlin}")
111121
}
@@ -220,7 +230,17 @@ if (enableSpotless.toBoolean()) {
220230
removeUnusedImports()
221231
endWithNewline()
222232
//noinspection GroovyAssignabilityCheck
223-
eclipse('4.19').configFile(formatFile)
233+
eclipse('4.19.0').configFile(formatFile)
234+
}
235+
kotlin {
236+
target 'src/*/kotlin/**/*.kt'
237+
238+
toggleOffOn()
239+
ktfmt('0.39')
240+
241+
trimTrailingWhitespace()
242+
indentWithSpaces(4)
243+
endWithNewline()
224244
}
225245
scala {
226246
target 'src/*/scala/**/*.scala'
@@ -424,8 +444,11 @@ repositories {
424444
}
425445
maven {
426446
name 'GTNH Maven'
427-
url 'http://jenkins.usrv.eu:8081/nexus/content/groups/public'
428-
allowInsecureProtocol = true
447+
url 'https://nexus.gtnewhorizons.com/repository/public/'
448+
}
449+
maven {
450+
name 'GTCEu Maven'
451+
url 'https://maven.gtceu.com'
429452
}
430453
}
431454
if (usesMixins.toBoolean() || forceEnableMixins.toBoolean()) {
@@ -454,9 +477,25 @@ configurations {
454477
config.extendsFrom(shadowCompile)
455478
}
456479
}
480+
481+
create("runtimeOnlyNonPublishable") {
482+
description = "Runtime only dependencies that are not published alongside the jar"
483+
canBeConsumed = false
484+
canBeResolved = false
485+
}
486+
create("devOnlyNonPublishable") {
487+
description = "Runtime and compiletime dependencies that are not published alongside the jar (compileOnly + runtimeOnlyNonPublishable)"
488+
canBeConsumed = false
489+
canBeResolved = false
490+
}
491+
492+
compileOnly.extendsFrom(devOnlyNonPublishable)
493+
runtimeOnlyNonPublishable.extendsFrom(devOnlyNonPublishable)
494+
runtimeClasspath.extendsFrom(runtimeOnlyNonPublishable)
495+
testRuntimeClasspath.extendsFrom(runtimeOnlyNonPublishable)
457496
}
458497

459-
String mixinProviderSpec = 'zone.rong:mixinbooter:8.9'
498+
String mixinProviderSpec = 'zone.rong:mixinbooter:9.1'
460499
dependencies {
461500
if (usesMixins.toBoolean()) {
462501
annotationProcessor 'org.ow2.asm:asm-debug-all:5.2'
@@ -474,7 +513,7 @@ dependencies {
474513
transitive = false
475514
}
476515
} else if (forceEnableMixins.toBoolean()) {
477-
runtimeOnly(mixinProviderSpec)
516+
runtimeOnlyNonPublishable(mixinProviderSpec)
478517
}
479518

480519
if (enableJUnit.toBoolean()) {
@@ -484,8 +523,8 @@ dependencies {
484523
}
485524

486525
if (enableModernJavaSyntax.toBoolean()) {
487-
annotationProcessor 'com.github.bsideup.jabel:jabel-javac-plugin:1.0.0'
488-
compileOnly('com.github.bsideup.jabel:jabel-javac-plugin:1.0.0') {
526+
annotationProcessor 'com.github.bsideup.jabel:jabel-javac-plugin:1.0.1'
527+
compileOnly('com.github.bsideup.jabel:jabel-javac-plugin:1.0.1') {
489528
transitive = false
490529
}
491530
// workaround for https://github.com/bsideup/jabel/issues/174
@@ -494,8 +533,8 @@ dependencies {
494533
patchedMinecraft 'me.eigenraven.java8unsupported:java-8-unsupported-shim:1.0.0'
495534

496535
// allow Jabel to work in tests
497-
testAnnotationProcessor "com.github.bsideup.jabel:jabel-javac-plugin:1.0.0"
498-
testCompileOnly("com.github.bsideup.jabel:jabel-javac-plugin:1.0.0") {
536+
testAnnotationProcessor "com.github.bsideup.jabel:jabel-javac-plugin:1.0.1"
537+
testCompileOnly("com.github.bsideup.jabel:jabel-javac-plugin:1.0.1") {
499538
transitive = false // We only care about the 1 annotation class
500539
}
501540
testCompileOnly "me.eigenraven.java8unsupported:java-8-unsupported-shim:1.0.0"
@@ -508,9 +547,13 @@ dependencies {
508547
}
509548

510549
if (includeCommonDevEnvMods.toBoolean()) {
511-
implementation 'mezz.jei:jei_1.12.2:4.16.1.302'
512-
//noinspection DependencyNotationArgument
513-
implementation rfg.deobf('curse.maven:top-245211:2667280') // TOP 1.4.28
550+
if (!(modId.equals('jei'))) {
551+
implementation 'mezz.jei:jei_1.12.2:4.16.1.302'
552+
}
553+
if (!(modId.equals('theoneprobe'))) {
554+
//noinspection DependencyNotationArgument
555+
implementation rfg.deobf('curse.maven:top-245211:2667280') // TOP 1.4.28
556+
}
514557
}
515558
}
516559

@@ -522,6 +565,12 @@ pluginManager.withPlugin('org.jetbrains.kotlin.kapt') {
522565
}
523566
}
524567

568+
configurations.configureEach {
569+
resolutionStrategy.dependencySubstitution {
570+
substitute module('org.scala-lang:scala-library:2.11.1') using module('org.scala-lang:scala-library:2.11.5') because('To allow mixing with Java 8 targets')
571+
}
572+
}
573+
525574
if (getFile('dependencies.gradle').exists()) {
526575
apply from: 'dependencies.gradle'
527576
} else if (getFile('dependencies.gradle.kts').exists()) {
@@ -663,6 +712,19 @@ jar {
663712
it.isDirectory() ? it : zipTree(it)
664713
}
665714
}
715+
716+
if (useSrcApiPath && apiPackage) {
717+
from sourceSets.api.output
718+
dependsOn apiClasses
719+
720+
include "${modGroupPath}/**"
721+
include "assets/**"
722+
include "mcmod.info"
723+
include "pack.mcmeta"
724+
if (accessTransformersFile) {
725+
include "META-INF/${accessTransformersFile}"
726+
}
727+
}
666728
}
667729

668730
// Configure default run tasks
@@ -679,12 +741,21 @@ if (separateRunDirectories.toBoolean()) {
679741
// Create API library jar
680742
tasks.register('apiJar', Jar) {
681743
archiveClassifier.set 'api'
682-
from(sourceSets.main.java) {
683-
include "${modGroupPath}/${apiPackagePath}/**"
684-
}
744+
if (useSrcApiPath) {
745+
from(sourceSets.api.java) {
746+
include "${modGroupPath}/${apiPackagePath}/**"
747+
}
748+
from(sourceSets.api.output) {
749+
include "${modGroupPath}/${apiPackagePath}/**"
750+
}
751+
} else {
752+
from(sourceSets.main.java) {
753+
include "${modGroupPath}/${apiPackagePath}/**"
754+
}
685755

686-
from(sourceSets.main.output) {
687-
include "${modGroupPath}/${apiPackagePath}/**"
756+
from(sourceSets.main.output) {
757+
include "${modGroupPath}/${apiPackagePath}/**"
758+
}
688759
}
689760
}
690761

@@ -878,7 +949,7 @@ if (cfApiKey.isPresent() || deploymentDebug.toBoolean()) {
878949
def changelogFile = getChangelog()
879950
def changelogRaw = changelogFile.exists() ? changelogFile.getText('UTF-8') : ""
880951

881-
mainFile.displayName = "${modName}: ${modVersion}"
952+
mainFile.displayName = versionDisplayFormat.replace('$MOD_NAME', modName).replace('$VERSION', modVersion)
882953
mainFile.releaseType = getReleaseType()
883954
mainFile.changelog = changelogRaw
884955
mainFile.changelogType = 'markdown'
@@ -894,6 +965,12 @@ if (cfApiKey.isPresent() || deploymentDebug.toBoolean()) {
894965
}
895966
String[] parts = dep.split(':')
896967
String type = parts[0], slug = parts[1]
968+
def types = [
969+
'req' : 'requiredDependency', 'required': 'requiredDependency',
970+
'opt' : 'optionalDependency', 'optional': 'optionalDependency',
971+
'embed' : 'embeddedLibrary', 'embedded': 'embeddedLibrary',
972+
'incomp': 'incompatible', 'fail' : 'incompatible']
973+
if (types.containsKey(type)) type = types[type]
897974
if (!(type in ['requiredDependency', 'embeddedLibrary', 'optionalDependency', 'tool', 'incompatible'])) {
898975
throw new Exception('Invalid Curseforge dependency type: ' + type)
899976
}
@@ -918,6 +995,7 @@ if (modrinthApiKey.isPresent() || deploymentDebug.toBoolean()) {
918995
modrinth {
919996
token = modrinthApiKey.getOrElse('debug_token')
920997
projectId = modrinthProjectId
998+
versionName = versionDisplayFormat.replace('$MOD_NAME', modName).replace('$VERSION', modVersion)
921999
changelog = changelogFile.exists() ? changelogFile.getText('UTF-8') : ""
9221000
versionType = getReleaseType()
9231001
versionNumber = modVersion
@@ -935,7 +1013,7 @@ if (modrinthApiKey.isPresent() || deploymentDebug.toBoolean()) {
9351013
}
9361014
String[] parts = dep.split(':')
9371015
String[] qual = parts[0].split('-')
938-
addModrinthDep(qual[0], qual[1], parts[1])
1016+
addModrinthDep(qual[0], qual.length > 1 ? qual[1] : 'project', parts[1])
9391017
}
9401018
}
9411019
tasks.modrinth.dependsOn(build)
@@ -944,9 +1022,17 @@ if (modrinthApiKey.isPresent() || deploymentDebug.toBoolean()) {
9441022

9451023
def addModrinthDep(String scope, String type, String name) {
9461024
com.modrinth.minotaur.dependencies.Dependency dep
1025+
def types = [
1026+
'req' : 'required',
1027+
'opt' : 'optional',
1028+
'embed' : 'embedded',
1029+
'incomp': 'incompatible', 'fail': 'incompatible']
1030+
if (types.containsKey(scope)) scope = types[scope]
9471031
if (!(scope in ['required', 'optional', 'incompatible', 'embedded'])) {
9481032
throw new Exception('Invalid modrinth dependency scope: ' + scope)
9491033
}
1034+
types = ['proj': 'project', '': 'project', 'p': 'project', 'ver': 'version', 'v': 'version']
1035+
if (types.containsKey(type)) type = types[type]
9501036
switch (type) {
9511037
case 'project':
9521038
dep = new ModDependency(name, scope)
@@ -974,8 +1060,8 @@ if (customMavenPublishUrl) {
9741060
}
9751061

9761062
// providers is not available here, use System for getting env vars
977-
groupId = System.getenv('ARTIFACT_GROUP_ID') ?: project.group
978-
artifactId = System.getenv('ARTIFACT_ID') ?: project.name
1063+
groupId = System.getenv('ARTIFACT_GROUP_ID') ?: project.mavenArtifactGroup
1064+
artifactId = System.getenv('ARTIFACT_ID') ?: project.modArchivesBaseName
9791065
version = System.getenv('RELEASE_VERSION') ?: publishedVersion
9801066
}
9811067
}
@@ -1120,6 +1206,11 @@ tasks.register('faq') {
11201206

11211207
// Helpers
11221208

1209+
def getDefaultArtifactGroup() {
1210+
def lastIndex = project.modGroup.lastIndexOf('.')
1211+
return lastIndex < 0 ? project.modGroup : project.modGroup.substring(0, lastIndex)
1212+
}
1213+
11231214
def getFile(String relativePath) {
11241215
return new File(projectDir, relativePath)
11251216
}

dependencies.gradle

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@
2222
* For more details, see https://docs.gradle.org/8.0.1/userguide/java_library_plugin.html#sec:java_library_configurations_graph
2323
*/
2424
dependencies {
25-
implementation rfg.deobf("curse.maven:codechicken-lib-1-8-242818:2779848") // CCL 3.2.3.358
26-
implementation rfg.deobf("curse.maven:gregtech-ce-unofficial-557242:5050979") // CEu 2.8.6
27-
implementation rfg.deobf("curse.maven:gregicality-multiblocks-564858:4910674") // GCYM 1.2.7
25+
api("codechicken:codechickenlib:3.2.3.358") // CCL 3.2.3.358
26+
devOnlyNonPublishable(rfg.deobf("curse.maven:gregtech-ce-unofficial-557242:5322655")) // CEu 2.8.8
27+
devOnlyNonPublishable(rfg.deobf("curse.maven:gregicality-multiblocks-564858:5121714")) // GCYM 1.2.8
2828

29-
implementation "CraftTweaker2:CraftTweaker2-MC1120-Main:1.12-4.1.20.684" // CrT 4.1.20.684
30-
implementation rfg.deobf("curse.maven:groovyscript-687577:4905039") // GrS 0.7.0
29+
api("com.cleanroommc:groovyscript:1.0.1") { transitive = false } // GrS 0.7.3
30+
api("CraftTweaker2:CraftTweaker2-MC1120-Main:1.12-4.1.20.689") // CrT 4.1.20.689
3131

3232
}

gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ modGroup = kono.ceu.materialreplication
77

88
# Version of your mod.
99
# This field can be left empty if you want your mod's version to be determined by the latest git tag instead.
10-
modVersion = 1.2.2
10+
modVersion = 1.2.3
1111

1212
# Whether to use the old jar naming structure (modid-mcversion-version) instead of the new version (modid-version)
1313
includeMCVersionJar = false
@@ -149,7 +149,7 @@ customMavenPublishUrl =
149149
# By default this will use the files found here: https://github.com/GregTechCEu/Buildscripts/tree/master/spotless
150150
# to format your code. However, you can create your own version of these files and place them in your project's
151151
# root directory to apply your own formatting options instead.
152-
enableSpotless = false
152+
enableSpotless = true
153153

154154
# Enable JUnit testing platform used for testing your code.
155155
# Uses JUnit 5. See guide and documentation here: https://junit.org/junit5/docs/current/user-guide/

settings.gradle

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@ pluginManagement {
33
maven {
44
// RetroFuturaGradle
55
name 'GTNH Maven'
6-
//noinspection HttpUrlsUsage
7-
url 'http://jenkins.usrv.eu:8081/nexus/content/groups/public/'
8-
allowInsecureProtocol = true
6+
url 'https://nexus.gtnewhorizons.com/repository/public/'
97
//noinspection GroovyAssignabilityCheck
108
mavenContent {
119
includeGroup 'com.gtnewhorizons'

spotless.importorder

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#Organize Import Order
2+
0=java
3+
1=javax
4+
2=net
5+
3=org
6+
4=com
7+
5=gregtech
8+
6=gregicality
9+
7=kono

0 commit comments

Comments
 (0)