Skip to content

Commit

Permalink
build: update gradle build scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
WakelessSloth56 committed Aug 21, 2022
1 parent 67e17ef commit 8face1f
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 12 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/auto-release.yml
Expand Up @@ -19,9 +19,9 @@ jobs:
- run: |
prop() { grep -P "^\s*[^#]?${1}=.*$" './gradle.properties' | cut -d'=' -f2; }
echo "GIT_TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
echo "ARNICALIB_VERSION=`echo $(prop "arnicalib_version")`" >> $GITHUB_ENV
echo "MOD_VERSION=`echo $(prop "mod_version")`" >> $GITHUB_ENV
- run: if [ "${{env.GIT_TAG}}" != "v${{env.ARNICALIB_VERSION}}" ];then exit 1;fi
- run: if [ "${{env.GIT_TAG}}" != "v${{env.MOD_VERSION}}" ];then exit 1;fi

second:
name: Build and publish
Expand Down
10 changes: 5 additions & 5 deletions build.gradle
Expand Up @@ -14,11 +14,11 @@ apply plugin: 'net.minecraftforge.gradle'
apply plugin: 'eclipse'
apply plugin: 'org.spongepowered.mixin'

group = 'org.auioc.mcmod'
archivesBaseName = 'arnicalib'
project.ext.modVersion = "${arnicalib_version}"
project.ext.modName = 'ArnicaLib'
project.ext.modId = 'arnicalib'
project.ext.modId = "${mod_id}"
project.ext.modName = "${mod_name}"
project.ext.modVersion= "${mod_version}"
group = "${group}"
archivesBaseName = "${project.modId}"
apply from: 'gradle/version.gradle'

java.toolchain.languageVersion = JavaLanguageVersion.of(17)
Expand Down
7 changes: 5 additions & 2 deletions gradle.properties
Expand Up @@ -12,5 +12,8 @@ mappings_version=1.18.2
mixin_version=0.8.5

github_repo=auioc/arnicalib-mcmod

arnicalib_version=5.4.1
group=org.auioc.mcmod
vendor=AUIOC
mod_id=arnicalib
mod_name=ArnicaLib
mod_version=5.4.1
4 changes: 2 additions & 2 deletions gradle/artifacts.gradle
@@ -1,10 +1,10 @@
def jarManifest = [
"Specification-Title": project.modId,
"Specification-Vendor": 'AUIOC',
"Specification-Vendor": "${vendor}",
"Specification-Version": '1',
"Implementation-Title": project.modName,
"Implementation-Version": project.modVersion,
"Implementation-Vendor" :'AUIOC',
"Implementation-Vendor" : "${vendor}",
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"),
"TweakClass": 'org.spongepowered.asm.launch.MixinTweaker',
"TweakOrder": 0,
Expand Down
4 changes: 3 additions & 1 deletion gradle/tasks.gradle
Expand Up @@ -13,5 +13,7 @@ task genUpdateJson() {
}

task outputProjectFullName() {
file("tmp/fullname.txt").write("${project.archivesBaseName}-${project.fullVersion}")
doFirst {
file("tmp/fullname.txt").write("${project.archivesBaseName}-${project.fullVersion}")
}
}

0 comments on commit 8face1f

Please sign in to comment.