Skip to content

Commit aaa8a48

Browse files
Merge remote-tracking branch 'origin/forge_1.16.5' into forge_1.17.1
2 parents caf18d1 + ac36b87 commit aaa8a48

4 files changed

Lines changed: 38 additions & 54 deletions

File tree

.github/workflows/build.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,7 @@ jobs:
2525
env:
2626
MAVENCI_PASS: ${{ secrets.MAVENCI_PASS }}
2727
run: ./gradlew publish
28+
- uses: actions/upload-artifact@v6
29+
with:
30+
name: TrackAPI-${{ env.ref }}
31+
path: build/libs/TrackAPI-*

build.gradle

Lines changed: 32 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,36 @@
1-
import cam72cam.universalmodcore.Util;
2-
31
buildscript {
42
repositories {
5-
mavenCentral()
63
maven { url = "https://maven.minecraftforge.net/" }
7-
maven { url = "https://teamopenindustry.cc/maven" }
4+
maven { url "https://plugins.gradle.org/" }
5+
mavenCentral()
86
}
97
dependencies {
10-
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '5.1.+', changing: true
11-
classpath 'cam72cam.universalmodcore:UniversalModCoreGradle:0.1.3'
8+
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '5.1.69', changing: true
129
}
1310
}
11+
1412
apply plugin: 'net.minecraftforge.gradle'
15-
// Only edit below this line, the above code adds and enables the necessary things for Forge to be setup.
1613
apply plugin: 'eclipse'
1714
apply plugin: 'maven-publish'
1815

19-
java.toolchain.languageVersion = JavaLanguageVersion.of(16) // Mojang ships Java 8 to end users, so your mod should target Java 8.
16+
java.toolchain.languageVersion = JavaLanguageVersion.of(16)
2017

2118
String baseVersion = "1.3"
2219
if (!"release".equalsIgnoreCase(System.getProperty("target"))) {
23-
baseVersion += "-" + Util.GitRevision()
20+
try {
21+
baseVersion += "-" + 'git rev-parse --verify --short=7 HEAD'.execute().text.trim()
22+
} catch (Exception ex) {
23+
baseVersion += "-unknown"
24+
}
2425
}
2526
version = "1.17.1-forge-" + baseVersion
2627
group = "trackapi" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
2728
archivesBaseName = "TrackAPI"
2829

30+
java {
31+
withSourcesJar()
32+
}
33+
2934
minecraft {
3035
// The mappings can be changed at any time, and must be in the following format.
3136
// snapshot_YYYYMMDD Snapshot are built nightly.
@@ -50,7 +55,7 @@ minecraft {
5055
property 'forge.logging.console.level', 'debug'
5156

5257
mods {
53-
examplemod {
58+
trackapi {
5459
source sourceSets.main
5560
}
5661
}
@@ -66,7 +71,7 @@ minecraft {
6671
property 'forge.logging.console.level', 'debug'
6772

6873
mods {
69-
examplemod {
74+
trackapi {
7075
source sourceSets.main
7176
}
7277
}
@@ -75,16 +80,13 @@ minecraft {
7580
data {
7681
workingDirectory project.file('run')
7782

78-
// Recommended logging data for a userdev environment
7983
property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
80-
81-
// Recommended logging level for the console
8284
property 'forge.logging.console.level', 'debug'
8385

84-
args '--mod', 'examplemod', '--all', '--output', file('src/generated/resources/')
86+
args '--mod', 'trackapi', '--all', '--output', file('src/generated/resources/')
8587

8688
mods {
87-
examplemod {
89+
trackapi {
8890
source sourceSets.main
8991
}
9092
}
@@ -95,42 +97,8 @@ minecraft {
9597
sourceSets.main.resources { srcDir 'src/generated/resources' }
9698

9799
dependencies {
98-
// Specify the version of Minecraft to use, If this is any group other then 'net.minecraft' it is assumed
99-
// that the dep is a ForgeGradle 'patcher' dependency. And it's patches will be applied.
100-
// The userdev artifact is a special name and will get all sorts of transformations applied to it.
101100
minecraft 'net.minecraftforge:forge:1.17.1-37.1.1'
102-
103-
// You may put jars on which you depend on in ./libs or you may define them like so..
104-
// compile "some.group:artifact:version:classifier"
105-
// compile "some.group:artifact:version"
106-
107-
// Real examples
108-
// compile 'com.mod-buildcraft:buildcraft:6.0.8:dev' // adds buildcraft to the dev env
109-
// compile 'com.googlecode.efficient-java-matrix-library:ejml:0.24' // adds ejml to the dev env
110-
111-
// The 'provided' configuration is for optional dependencies that exist at compile-time but might not at runtime.
112-
// provided 'com.mod-buildcraft:buildcraft:6.0.8:dev'
113-
114-
// These dependencies get remapped to your current MCP mappings
115-
// deobf 'com.mod-buildcraft:buildcraft:6.0.8:dev'
116-
117-
// For more info...
118-
// http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html
119-
// http://www.gradle.org/docs/current/userguide/dependency_management.html
120-
121-
}
122-
123-
// Example for how to get properties into the manifest for reading by the runtime..
124-
jar {
125-
manifest {
126-
attributes([
127-
"Specification-Title": "TrackAPI",
128-
"Specification-Version": "1", // We are version 1 of ourselves
129-
"Implementation-Title": project.name,
130-
"Implementation-Version": "${version}",
131-
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
132-
])
133-
}
101+
minecraftLibrary "org.apache.maven.wagon:wagon-ssh:3.5.3"
134102
}
135103

136104
jar.finalizedBy('reobfJar')
@@ -139,6 +107,8 @@ publishing {
139107
publications {
140108
mavenJava(MavenPublication) {
141109
artifact jar
110+
artifact sourcesJar
111+
artifactId archivesBaseName
142112
}
143113
}
144114
repositories {
@@ -150,4 +120,14 @@ publishing {
150120
}
151121
}
152122
}
153-
}
123+
}
124+
125+
task ('showBuildInfo') {
126+
doLast {
127+
System.out.println("Build Uploaded to Maven at: ")
128+
System.out.println("https://teamopenindustry.cc/maven/trackapi/TrackAPI/${version}/TrackAPI-${version}.jar")
129+
}
130+
}
131+
132+
publish.finalizedBy showBuildInfo
133+

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
33
zipStoreBase=GRADLE_USER_HOME
44
zipStorePath=wrapper/dists
5-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
5+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip

src/main/resources/META-INF/mods.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ loaderVersion="[37,)"
33
license="MIT"
44
[[mods]]
55
modId="trackapi"
6-
version="1.2"
6+
version="1.3"
77
displayName="TrackAPI"
88
authors="cam72cam"
99
description='''A common track interface for minecraft forge'''

0 commit comments

Comments
 (0)