mirror of
https://github.com/GTNewHorizons/StructureLib.git
synced 2026-11-13 16:54:01 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
27bb7b2ad9 |
No files matched your search
@@ -1,44 +0,0 @@
|
|||||||
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
|
|
||||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
|
|
||||||
|
|
||||||
name: Release latest build
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [ master, main ]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-and-release:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Set release version
|
|
||||||
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: Set up JDK 8
|
|
||||||
uses: actions/setup-java@v2
|
|
||||||
with:
|
|
||||||
java-version: '8'
|
|
||||||
distribution: 'adopt'
|
|
||||||
cache: gradle
|
|
||||||
|
|
||||||
- name: Grant execute permission for gradlew
|
|
||||||
run: chmod +x gradlew
|
|
||||||
|
|
||||||
- name: Setup the workspace
|
|
||||||
run: ./gradlew setupCIWorkspace
|
|
||||||
|
|
||||||
- name: Build the mod
|
|
||||||
run: ./gradlew build
|
|
||||||
|
|
||||||
- name: Update latest tag
|
|
||||||
uses: "marvinpinto/action-automatic-releases@latest"
|
|
||||||
with:
|
|
||||||
repo_token: "${{ secrets.GITHUB_TOKEN }}"
|
|
||||||
automatic_release_tag: "latest"
|
|
||||||
prerelease: false
|
|
||||||
title: "Latest build"
|
|
||||||
files: build/libs/*.jar
|
|
||||||
+17
-21
@@ -1,4 +1,4 @@
|
|||||||
//version: 4f3d1b46cf51f9d4ded5379b5d817a2a6f6b302d
|
//version: ffe7b130f98fdfa1ac7c6ba4bd34722a55ab28d4
|
||||||
/*
|
/*
|
||||||
DO NOT CHANGE THIS FILE!
|
DO NOT CHANGE THIS FILE!
|
||||||
|
|
||||||
@@ -62,6 +62,10 @@ idea {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(JavaVersion.current() != JavaVersion.VERSION_1_8) {
|
||||||
|
throw new GradleException("This project requires Java 8, but it's running on " + JavaVersion.current())
|
||||||
|
}
|
||||||
|
|
||||||
checkPropertyExists("modName")
|
checkPropertyExists("modName")
|
||||||
checkPropertyExists("modId")
|
checkPropertyExists("modId")
|
||||||
checkPropertyExists("modGroup")
|
checkPropertyExists("modGroup")
|
||||||
@@ -153,7 +157,12 @@ configurations.all {
|
|||||||
// Fix Jenkins' Git: chmod a file should not be detected as a change and append a '.dirty' to the version
|
// Fix Jenkins' Git: chmod a file should not be detected as a change and append a '.dirty' to the version
|
||||||
'git config core.fileMode false'.execute()
|
'git config core.fileMode false'.execute()
|
||||||
// Pulls version from git tag
|
// Pulls version from git tag
|
||||||
version = minecraftVersion + "-" + gitVersion()
|
try {
|
||||||
|
version = minecraftVersion + "-" + gitVersion()
|
||||||
|
}
|
||||||
|
catch (Exception e) {
|
||||||
|
throw new IllegalStateException("This mod must be version controlled by Git AND the repository must provide at least one tag!");
|
||||||
|
}
|
||||||
group = modGroup
|
group = modGroup
|
||||||
archivesBaseName = modId
|
archivesBaseName = modId
|
||||||
|
|
||||||
@@ -225,14 +234,13 @@ dependencies {
|
|||||||
|
|
||||||
apply from: 'dependencies.gradle'
|
apply from: 'dependencies.gradle'
|
||||||
|
|
||||||
def mixinConfigJson = "mixins." + modId + ".json"
|
|
||||||
def mixingConfigRefMap = "mixins." + modId + ".refmap.json"
|
def mixingConfigRefMap = "mixins." + modId + ".refmap.json"
|
||||||
def refMap = "${tasks.compileJava.temporaryDir}" + File.separator + mixingConfigRefMap
|
def refMap = "${tasks.compileJava.temporaryDir}" + File.separator + mixingConfigRefMap
|
||||||
def mixinSrg = "${tasks.reobf.temporaryDir}" + File.separator + "mixins.srg"
|
def mixinSrg = "${tasks.reobf.temporaryDir}" + File.separator + "mixins.srg"
|
||||||
|
|
||||||
task generateAssets {
|
task generateAssets {
|
||||||
if(usesMixins.toBoolean()) {
|
if(usesMixins.toBoolean()) {
|
||||||
new File(projectDir.toString() + "/src/main/resources/", mixinConfigJson).text = """{
|
new File(projectDir.toString() + "/src/main/resources/", "mixins." + modId + ".json").text = """{
|
||||||
"required": true,
|
"required": true,
|
||||||
"minVersion": "0.7.11",
|
"minVersion": "0.7.11",
|
||||||
"package": "${modGroup}.${mixinsPackage}",
|
"package": "${modGroup}.${mixinsPackage}",
|
||||||
@@ -351,6 +359,10 @@ processResources
|
|||||||
"modName": modName
|
"modName": modName
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(usesMixins.toBoolean()) {
|
||||||
|
from refMap
|
||||||
|
}
|
||||||
|
|
||||||
// copy everything else, thats not the mcmod.info
|
// copy everything else, thats not the mcmod.info
|
||||||
from(sourceSets.main.resources.srcDirs) {
|
from(sourceSets.main.resources.srcDirs) {
|
||||||
exclude 'mcmod.info'
|
exclude 'mcmod.info'
|
||||||
@@ -374,7 +386,7 @@ def getManifestAttributes() {
|
|||||||
if(usesMixins.toBoolean()) {
|
if(usesMixins.toBoolean()) {
|
||||||
manifestAttributes += [
|
manifestAttributes += [
|
||||||
"TweakClass" : "org.spongepowered.asm.launch.MixinTweaker",
|
"TweakClass" : "org.spongepowered.asm.launch.MixinTweaker",
|
||||||
"MixinConfigs" : mixinConfigJson,
|
"MixinConfigs" : "mixins." + modId + ".json",
|
||||||
"ForceLoadAsMod" : containsMixinsAndOrCoreModOnly.toBoolean() == false
|
"ForceLoadAsMod" : containsMixinsAndOrCoreModOnly.toBoolean() == false
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -448,22 +460,6 @@ artifacts {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Crude handler to append custom maven repositories to maven dependency
|
|
||||||
install{
|
|
||||||
repositories{
|
|
||||||
mavenInstaller{
|
|
||||||
pom.withXml {
|
|
||||||
def repositoriesNode = asNode().appendNode("repositories")
|
|
||||||
project.repositories.each { repository ->
|
|
||||||
def repositoryNode = repositoriesNode.appendNode("repository")
|
|
||||||
repositoryNode.appendNode("name", repository.name)
|
|
||||||
repositoryNode.appendNode("url", repository.properties.get("url"))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Updating
|
// Updating
|
||||||
task updateBuildScript {
|
task updateBuildScript {
|
||||||
doLast {
|
doLast {
|
||||||
|
|||||||
Reference in new issue
Block a user