Skip to content

Commit

Permalink
Update gradle wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
henkelmax committed Jun 5, 2023
1 parent 5ad8237 commit ec45be3
Show file tree
Hide file tree
Showing 7 changed files with 208 additions and 170 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -118,5 118,5 @@ run/
!gradle-wrapper.jar

curseforge_api_key.txt
forge_update_api_key.txt
mod_update_api_key.txt
modrinth_token.txt
75 changes: 25 additions & 50 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,22 1,11 @@
buildscript {
repositories {
maven { url = 'https://maven.maxhenkel.de/repository/public' }
mavenLocal()
}
dependencies {
classpath group: 'de.maxhenkel.forge-update', name: 'forge-update', version: '1.0.4'
}
}

plugins {
id "fabric-loom" version "1.0-SNAPSHOT"
id "com.matthewprenger.cursegradle" version "1.4.0"
id "com.github.johnrengelman.shadow" version "7.1.0"
id "com.modrinth.minotaur" version "2. "
id 'fabric-loom' version '1.2-SNAPSHOT'
id 'com.matthewprenger.cursegradle' version '1.4.0'
id 'com.github.johnrengelman.shadow' version '8.1.1'
id 'com.modrinth.minotaur' version '2. '
id 'mod-update' version '2.0.0'
}

apply plugin: 'forge-update'

sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17

Expand All @@ -27,11 16,8 @@ group = maven_group
repositories {
mavenLocal()
mavenCentral()
maven { url = "https://maven.fabricmc.net/" }
maven {
name = "henkelmax.public"
url = 'https://maven.maxhenkel.de/repository/public'
}
maven { url = 'https://maven.fabricmc.net/' }
maven { url = 'https://maven.maxhenkel.de/repository/public'}
}

runClient.doFirst {
Expand All @@ -51,17 37,17 @@ dependencies {
}

processResources {
filesMatching("fabric.mod.json") {
expand "version": version,
"minecraft_dependency": minecraft_dependency,
"loader_version": loader_version,
"fabric_version": fabric_version,
"compatibility_version": mod_compatibility_version
filesMatching('fabric.mod.json') {
expand 'version': version,
'minecraft_dependency': minecraft_dependency,
'loader_version': loader_version,
'fabric_version': fabric_version,
'compatibility_version': mod_compatibility_version
}
}

tasks.withType(JavaCompile).configureEach {
it.options.encoding = "UTF-8"
it.options.encoding = 'UTF-8'
it.options.release = 17
}

Expand All @@ -70,7 56,7 @@ java {
}

jar {
from("LICENSE") {
from('LICENSE') {
rename { "${it}_${archivesBaseName}" }
}
}
Expand All @@ -83,8 69,8 @@ curseforge {
changelog = file('changelog.md')
releaseType = release_type
addGameVersion curseforge_minecraft_version
addGameVersion "Fabric"
addGameVersion "Java 17"
addGameVersion 'Fabric'
addGameVersion 'Java 17'
mainArtifact(file("${buildDir}/libs/${archivesBaseName}-${version}.jar")) {
displayName = "[FABRIC][${minecraft_version}] ${mod_name} ${mod_version}"
relations {
Expand Down Expand Up @@ -114,45 100,34 @@ modrinth {
versionName = "[FABRIC][${minecraft_version}] ${mod_name} ${mod_version}"
uploadFile = remapJar
versionType = release_type.toUpperCase()
changelog = file("changelog.md").text
changelog = file('changelog.md').text
gameVersions = [minecraft_version]
loaders = ['fabric']
dependencies {
required.project "P7dR8mSH" // Fabric API
required.project 'P7dR8mSH' // Fabric API
}
syncBodyFrom = file("${rootDir}/readme.md").text
}
tasks.modrinth.dependsOn(build)

forgeUpdate {
def messages = []
file('changelog.md').eachLine { String line ->
if (line.trim().startsWith('-')) {
messages.add(line.replaceFirst('-', '').trim())
}
}

modUpdate {
serverURL = 'https://update.maxhenkel.de/'
apiKey = file('forge_update_api_key.txt').exists() ? file('forge_update_api_key.txt').text : ''
modID = mod_id
gameVersion = minecraft_version
modLoader = "fabric"
modLoader = 'fabric'
modVersion = mod_version
updateMessages = messages
changelogFile = file('changelog.md')
releaseType = release_type
tags = recommended == 'true' ? ['recommended'] : []
}

shadowJar {
configurations = [project.configurations.shadow]
classifier 'shadow-dev'
archiveClassifier = 'shadow-dev'
relocate 'de.maxhenkel.configbuilder', "de.maxhenkel.${mod_id}.configbuilder"
}

prepareRemapJar {
remapJar {
dependsOn shadowJar
inputFile = shadowJar.archiveFile.get()
}

remapJar {
input = shadowJar.archiveFile.get()
}
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit ec45be3

Please sign in to comment.