Skip to content

Commit

Permalink
Merge pull request #19 from GTNewHorizons/maven
Browse files Browse the repository at this point in the history
update buildscript
  • Loading branch information
Dream-Master authored Mar 4, 2022
2 parents 76a09de + 5bb6316 commit d6c3374
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 17 deletions.
Empty file modified .github/scripts/test_no_error_reports
100644 → 100755
Empty file.
35 changes: 22 additions & 13 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
//version: 1644894948
//version: 1646409286
/*
DO NOT CHANGE THIS FILE!
Also, you may replace this file at any time if there is an update available.
Please check https://github.com/GTNewHorizons/ExampleMod1.7.10/blob/main/build.gradle for updates.
*/

import org.gradle.internal.logging.text.StyledTextOutput
import org.gradle.internal.logging.text.StyledTextOutputFactory
import org.gradle.internal.logging.text.StyledTextOutput.Style

import com.github.jengelman.gradle.plugins.shadow.tasks.ConfigureShadowRelocation
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import org.gradle.internal.logging.text.StyledTextOutput.Style
import org.gradle.internal.logging.text.StyledTextOutputFactory

import java.util.concurrent.TimeUnit

Expand Down Expand Up @@ -104,6 +103,7 @@ checkPropertyExists("usesShadowedDependencies")
checkPropertyExists("developmentEnvironmentUserName")

boolean noPublishedSources = project.findProperty("noPublishedSources") ? project.noPublishedSources.toBoolean() : false
boolean usesMixinDebug = project.findProperty('usesMixinDebug') ?: project.usesMixins.toBoolean()

String javaSourceDir = "src/main/java/"
String scalaSourceDir = "src/main/scala/"
Expand Down Expand Up @@ -214,13 +214,17 @@ else {
def arguments = []
def jvmArguments = []

if(usesMixins.toBoolean()) {
if (usesMixins.toBoolean()) {
arguments += [
"--tweakClass org.spongepowered.asm.launch.MixinTweaker"
]
jvmArguments += [
"-Dmixin.debug.countInjections=true", "-Dmixin.debug.verbose=true", "-Dmixin.debug.export=true"
"--tweakClass org.spongepowered.asm.launch.MixinTweaker"
]
if (usesMixinDebug.toBoolean()) {
jvmArguments += [
"-Dmixin.debug.countInjections=true",
"-Dmixin.debug.verbose=true",
"-Dmixin.debug.export=true"
]
}
}

minecraft {
Expand Down Expand Up @@ -312,18 +316,23 @@ def refMap = "${tasks.compileJava.temporaryDir}" + File.separator + mixingConfig
def mixinSrg = "${tasks.reobf.temporaryDir}" + File.separator + "mixins.srg"

task generateAssets {
if(usesMixins.toBoolean()) {
getFile("/src/main/resources/mixins." + modId + ".json").text = """{
if (usesMixins.toBoolean()) {
def mixinConfigFile = getFile("/src/main/resources/mixins." + modId + ".json");
if (!mixinConfigFile.exists()) {
mixinConfigFile.text = """{
"required": true,
"minVersion": "0.7.11",
"package": "${modGroup}.${mixinsPackage}",
"plugin": "${modGroup}.${mixinPlugin}",
"refmap": "${mixingConfigRefMap}",
"target": "@env(DEFAULT)",
"compatibilityLevel": "JAVA_8"
"compatibilityLevel": "JAVA_8",
"mixins": [],
"client": [],
"server": []
}
"""
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion dependencies.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Add your dependencies here

dependencies {
compile('com.github.GTNewHorizons:waila:1.5.19:dev')
compile('com.github.GTNewHorizons:waila:1.5.20:dev')

compileOnly('com.github.GTNewHorizons:ForestryMC:4.4.6:dev')
compileOnly('curse.maven:minefactory-reloaded-66672:2366150')
Expand Down
3 changes: 0 additions & 3 deletions repositories.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,4 @@ repositories {
includeGroup 'curse.maven'
}
}
maven {
url 'https://jitpack.io'
}
}

0 comments on commit d6c3374

Please sign in to comment.