1
- // version: 8fa7883b6196c1765266f4e6ddf3118d5043aafb
1
+ // version: 1642484596
2
2
/*
3
3
DO NOT CHANGE THIS FILE!
4
4
5
5
Also, you may replace this file at any time if there is an update available.
6
- Please check https://github.com/SinTh0r4s /ExampleMod1.7.10/blob/main/build.gradle for updates.
6
+ Please check https://github.com/GTNewHorizons /ExampleMod1.7.10/blob/main/build.gradle for updates.
7
7
*/
8
8
9
9
@@ -32,7 +32,7 @@ buildscript {
32
32
}
33
33
}
34
34
dependencies {
35
- classpath ' com.github.GTNewHorizons:ForgeGradle:1.2.4 '
35
+ classpath ' com.github.GTNewHorizons:ForgeGradle:1.2.5 '
36
36
}
37
37
}
38
38
@@ -88,6 +88,7 @@ checkPropertyExists("containsMixinsAndOrCoreModOnly")
88
88
checkPropertyExists(" usesShadowedDependencies" )
89
89
checkPropertyExists(" developmentEnvironmentUserName" )
90
90
91
+ boolean noPublishedSources = project. findProperty(" noPublishedSources" ) ? project. noPublishedSources. toBoolean() : false
91
92
92
93
String javaSourceDir = " src/main/java/"
93
94
String scalaSourceDir = " src/main/scala/"
@@ -151,12 +152,16 @@ configurations.all {
151
152
152
153
// Fix Jenkins' Git: chmod a file should not be detected as a change and append a '.dirty' to the version
153
154
' git config core.fileMode false' . execute()
154
- // Pulls version from git tag
155
+
156
+ // Pulls version first from the VERSION env and then git tag
157
+ String identifiedVersion
155
158
try {
156
- version = minecraftVersion + " -" + gitVersion()
159
+ String versionOverride = System . getenv(" VERSION" ) ?: null
160
+ identifiedVersion = versionOverride == null ? gitVersion() : versionOverride
161
+ version = minecraftVersion + " -" + identifiedVersion
157
162
}
158
163
catch (Exception e) {
159
- throw new IllegalStateException (" This mod must be version controlled by Git AND the repository must provide at least one tag!" );
164
+ throw new IllegalStateException (" This mod must be version controlled by Git AND the repository must provide at least one tag, or the VERSION override must be set !" );
160
165
}
161
166
162
167
group = modGroup
@@ -223,15 +228,15 @@ dependencies {
223
228
annotationProcessor(" com.google.code.gson:gson:2.8.6" )
224
229
annotationProcessor(" org.spongepowered:mixin:0.8-SNAPSHOT" )
225
230
// using 0.8 to workaround a issue in 0.7 which fails mixin application
226
- compile(" org.spongepowered:mixin :0.7.11-SNAPSHOT " ) {
231
+ compile(" com.github.GTNewHorizons:SpongePoweredMixin :0.7.12-GTNH " ) {
227
232
// Mixin includes a lot of dependencies that are too up-to-date
228
233
exclude module : " launchwrapper"
229
234
exclude module : " guava"
230
235
exclude module : " gson"
231
236
exclude module : " commons-io"
232
237
exclude module : " log4j-core"
233
238
}
234
- compile(" com.github.GTNewHorizons:SpongeMixins:1.3.3:dev " )
239
+ compile(" com.github.GTNewHorizons:SpongeMixins:1.5.0 " )
235
240
}
236
241
}
237
242
@@ -480,7 +485,9 @@ task apiJar(type: Jar) {
480
485
}
481
486
482
487
artifacts {
483
- archives sourcesJar
488
+ if (! noPublishedSources) {
489
+ archives sourcesJar
490
+ }
484
491
archives devJar
485
492
if (apiPackage) {
486
493
archives apiJar
@@ -491,29 +498,28 @@ artifacts {
491
498
publishing {
492
499
publications {
493
500
maven(MavenPublication ) {
494
- artifact source : jar
495
- artifact source : sourcesJar, classifier : " src"
496
- artifact source : devJar, classifier : " dev"
501
+ artifact source : usesShadowedDependencies. toBoolean() ? shadowJar : jar, classifier: " "
502
+ if (! noPublishedSources) {
503
+ artifact source : sourcesJar, classifier : " src"
504
+ }
505
+ artifact source : usesShadowedDependencies. toBoolean() ? shadowDevJar : devJar, classifier: " dev"
497
506
if (apiPackage) {
498
507
artifact source : apiJar, classifier : " api"
499
508
}
500
509
501
- groupId = System . getenv(" ARTIFACT_GROUP_ID" ) ?: group
510
+ groupId = System . getenv(" ARTIFACT_GROUP_ID" ) ?: " com.github.GTNewHorizons "
502
511
artifactId = System . getenv(" ARTIFACT_ID" ) ?: project. name
503
- version = System . getenv(" ARTIFACT_VERSION" ) ?: project. version
512
+ // Using the identified version, not project.version as it has the prepended 1.7.10
513
+ version = System . getenv(" RELEASE_VERSION" ) ?: identifiedVersion
504
514
}
505
515
}
506
-
516
+
507
517
repositories {
508
518
maven {
509
- String owner = System . getenv(" REPOSITORY_OWNER" ) ?: " Unknown"
510
- String repositoryName = System . getenv(" REPOSITORY_NAME" ) ?: " Unknown"
511
- String githubRepositoryUrl = " https://maven.pkg.github.com/$owner /$repositoryName "
512
- name = " GitHubPackages"
513
- url = githubRepositoryUrl
519
+ url = " http://jenkins.usrv.eu:8081/nexus/content/repositories/releases"
514
520
credentials {
515
- username = System . getenv(" GITHUB_ACTOR " ) ?: " NONE"
516
- password = System . getenv(" GITHUB_TOKEN " ) ?: " NONE"
521
+ username = System . getenv(" MAVEN_USER " ) ?: " NONE"
522
+ password = System . getenv(" MAVEN_PASSWORD " ) ?: " NONE"
517
523
}
518
524
}
519
525
}
@@ -537,7 +543,7 @@ if (isNewBuildScriptVersionAvailable(projectDir.toString())) {
537
543
}
538
544
539
545
static URL availableBuildScriptUrl () {
540
- new URL (" https://raw.githubusercontent.com/SinTh0r4s /ExampleMod1.7.10/main/build.gradle" )
546
+ new URL (" https://raw.githubusercontent.com/GTNewHorizons /ExampleMod1.7.10/main/build.gradle" )
541
547
}
542
548
543
549
boolean performBuildScriptUpdate (String projectDir ) {
@@ -579,7 +585,7 @@ configure(updateBuildScript) {
579
585
580
586
def checkPropertyExists (String propertyName ) {
581
587
if (project. hasProperty(propertyName) == false ) {
582
- throw new GradleException (" This project requires a property \" " + propertyName + " \" ! Please add it your \" gradle.properties\" . You can find all properties and their description here: https://github.com/SinTh0r4s /ExampleMod1.7.10/blob/main/gradle.properties" )
588
+ throw new GradleException (" This project requires a property \" " + propertyName + " \" ! Please add it your \" gradle.properties\" . You can find all properties and their description here: https://github.com/GTNewHorizons /ExampleMod1.7.10/blob/main/gradle.properties" )
583
589
}
584
590
}
585
591
0 commit comments