Skip to content

Commit

Permalink
Build fix and cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Aurocosh committed Jun 9, 2024
1 parent d746fcd commit e23e56b
Show file tree
Hide file tree
Showing 4 changed files with 94 additions and 75 deletions.
111 changes: 56 additions & 55 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,46 +1,48 @@
import org.gradle.internal.os.OperatingSystem
import org.jetbrains.gradle.ext.Gradle

plugins {
id 'org.jetbrains.gradle.plugin.idea-ext' version '1.1.7'
id 'com.gtnewhorizons.retrofuturagradle' version '1.3.27'
id 'com.gtnewhorizons.retrofuturagradle' version '1.3.36'
id 'com.matthewprenger.cursegradle' version '1.4.0'
id 'org.jetbrains.kotlin.jvm' version '1.9.24'
id 'org.jetbrains.kotlin.plugin.serialization' version '1.9.24'
}

repositories {
mavenCentral()
maven {
name = "forge"
url = "https://maven.minecraftforge.net/"
}
maven {
name 'CurseMaven'
url 'https://cursemaven.com'
content {
includeGroup 'curse.maven'
}
}
maven {
name 'CleanroomMC Maven'
url 'https://maven.cleanroommc.com'
}
maven {
// location of the maven that hosts JEI files
name = "Progwml6 maven"
url = "https://dvs1.progwml6.com/files/maven/"
}
maven {
// location of a maven mirror for JEI files, as a fallback
name = "ModMaven"
url = "https://modmaven.k-4u.nl"
}
// maven {
// // location of a maven mirror for JEI files, as a fallback
// name = "ModMaven"
// url = "https://modmaven.dev"
// }
maven { // TOP
name 'tterrag maven'
url "https://maven.tterrag.com/"
}
maven { // Patchouli
url 'https://maven.blamejared.com'
}
maven {
url "https://maven.cleanroommc.com"
}

maven {
url 'https://repo.repsy.io/mvn/aurocosh/default'
}

mavenLocal()
}

Expand All @@ -49,7 +51,6 @@ def currentReleaseType = getReleaseType()
version = "${mod_version}.${generateVersionCode()}"
def localDependencies = getEnvVar('LOCAL_DEPENDENCIES').toBoolean()

println "Mod version: $version"
println "Mod version: $version"
println "Release type: $currentReleaseType"
println "Local dependencies: $localDependencies"
Expand All @@ -74,11 +75,6 @@ tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8'
}

configurations {
embed
implementation.extendsFrom(embed)
}

minecraft {
mcVersion = '1.12.2'

Expand Down Expand Up @@ -185,9 +181,6 @@ static def getEnvVar(varName,fallback = '') {
return value ? value : fallback
}

jar {
}

curseforge {
apiKey = getEnvVar('CURSEFORGE_API_KEY')
project {
Expand All @@ -205,38 +198,46 @@ curseforge {
}
}

//
//idea {
// module {
// inheritOutputDirs = true
// }
// project {
// settings {
// runConfigurations {
// "1. Run Client"(Gradle) {
// taskNames = ["runClient"]
// }
// "2. Run Server"(Gradle) {
// taskNames = ["runServer"]
// }
// "3. Run Obfuscated Client"(Gradle) {
// taskNames = ["runObfClient"]
// }
// "4. Run Obfuscated Server"(Gradle) {
// taskNames = ["runObfServer"]
// }
// }
// compiler.javac {
// afterEvaluate {
// javacAdditionalOptions = "-encoding utf8"
// moduleJavacAdditionalOptions = [
// (project.name + ".main"): tasks.compileJava.options.compilerArgs.collect { '"' + it + '"' }.join(' ')
// ]
// }
// }
// }
// }
//}

idea {
module {
inheritOutputDirs true
downloadJavadoc true
downloadSources true
}
project {
settings {
runConfigurations {
'1. Setup Workspace'(Gradle) {
taskNames = ['setupDecompWorkspace']
}
'2. Run Client'(Gradle) {
taskNames = ['runClient']
}
'3. Run Server'(Gradle) {
taskNames = ['runServer']
}
'4. Run Obfuscated Client'(Gradle) {
taskNames = ['runObfClient']
}
'5. Run Obfuscated Server'(Gradle) {
taskNames = ['runObfServer']
}
'6. Build Jars'(Gradle) {
taskNames = ['build']
}
}
compiler.javac {
afterEvaluate {
javacAdditionalOptions = '-encoding utf8'
moduleJavacAdditionalOptions = [
(project.name + ".main"): tasks.compileJava.options.compilerArgs.collect { '"' + it + '"' }.join(' ')
]
}
}
}
}
}

tasks.named("processIdeaSettings").configure {
dependsOn("injectTags")
Expand Down
7 changes: 0 additions & 7 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,16 @@ mod_version = 1.0
mod_group = aurocosh.divinefavor
mod_archives_base_name = divinefavor

mc_mappings = stable_39
dir_output = ../builds/divinefavor/
mc_version = 1.12
mc_sub_version = 1.12.2
forge_version = 14.23.5.2768

mt_version = 3.0.5.15
jei_version = 4.15.0.269
ct_version = 4.1.20.698
p_version = 1.0-19.97
ctm_version=0.4.0.24

#kotlin_version = 1.3.10
kotlin_version = 1.9.24
forgelin_version = 1.8.2
auto_network_version = 1.0.45

curse_project_id = 322571
curse_release_type = beta

Expand Down
25 changes: 25 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
pluginManagement {
repositories {
maven {
// RetroFuturaGradle
name 'GTNH Maven'
url 'https://nexus.gtnewhorizons.com/repository/public/'
mavenContent {
includeGroup 'com.gtnewhorizons'
includeGroup 'com.gtnewhorizons.retrofuturagradle'
}
}
gradlePluginPortal()
mavenCentral()
mavenLocal()
}
}

plugins {
// Automatic toolchain provisioning
id 'org.gradle.toolchains.foojay-resolver-convention' version '0.4.0'
}

// Due to an IntelliJ bug, this has to be done
// rootProject.name = archives_base_name
rootProject.name = rootProject.projectDir.getName()
26 changes: 13 additions & 13 deletions src/main/resources/mcmod.info
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
[
{
"modid": "divinefavor",
"name": "Divine Favor",
"description": "Divine Favor",
"version": "${version}",
"mcversion": "${mcversion}",
"url": "",
"updateUrl": "",
"authorList": ["Aurocosh"],
"credits": "Aurocosh",
"logoFile": "",
"screenshots": []
}
{
"modid": "divinefavor",
"name": "Divine Favor",
"description": "Divine Favor",
"version": "${version}",
"mcversion": "${mcversion}",
"url": "",
"updateUrl": "",
"authorList": ["Aurocosh"],
"credits": "Aurocosh",
"logoFile": "",
"screenshots": []
}
]

0 comments on commit e23e56b

Please sign in to comment.