Skip to content

Commit

Permalink
Update the Buildscript (#54)
Browse files Browse the repository at this point in the history
  • Loading branch information
ALongStringOfNumbers authored Jul 11, 2023
1 parent fcc8a63 commit 63c0c00
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 9 deletions.
25 changes: 18 additions & 7 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//version: 1688526754
//version: 1688969024
/*
* DO NOT CHANGE THIS FILE!
* Also, you may replace this file at any time if there is an update available.
Expand Down Expand Up @@ -69,6 +69,7 @@ propertyDefaultIfUnset("forceEnableMixins", false)
propertyDefaultIfUnset("usesShadowedDependencies", false)
propertyDefaultIfUnset("minimizeShadowedDependencies", true)
propertyDefaultIfUnset("relocateShadowedDependencies", true)
propertyDefaultIfUnset("separateRunDirectories", false)
propertyDefaultIfUnsetWithEnvVar("modrinthProjectId", "", "MODRINTH_PROJECT_ID")
propertyDefaultIfUnset("modrinthRelations", "")
propertyDefaultIfUnsetWithEnvVar("curseForgeProjectId", "", "CURSEFORGE_PROJECT_ID")
Expand Down Expand Up @@ -368,10 +369,6 @@ repositories {
}
}
if (usesMixins.toBoolean() || forceEnableMixins.toBoolean()) {
maven {
name 'Sponge Maven'
url 'https://repo.spongepowered.org/maven'
}
// need to add this here even if we did not above
if (!includeWellKnownRepositories.toBoolean()) {
maven {
Expand Down Expand Up @@ -401,8 +398,11 @@ configurations {

dependencies {
if (usesMixins.toBoolean() || forceEnableMixins.toBoolean()) {
implementation 'zone.rong:mixinbooter:7.0'
String mixin = modUtils.enableMixins('org.spongepowered:mixin:0.8.3', "mixins.${modId}.refmap.json")
implementation 'zone.rong:mixinbooter:8.3'
String mixin = 'zone.rong:mixinbooter:8.3'
if (usesMixins.toBoolean()) {
mixin = modUtils.enableMixins(mixin, "mixins.${modId}.refmap.json")
}

api (mixin) {
transitive = false
Expand Down Expand Up @@ -593,6 +593,17 @@ jar {
}
}

// Configure default run tasks
if (separateRunDirectories.toBoolean()) {
runClient {
workingDir = file('run/client')
}

runServer {
workingDir = file('run/server')
}
}

// Create API library jar
tasks.register('apiJar', Jar) {
archiveClassifier.set 'api'
Expand Down
3 changes: 1 addition & 2 deletions dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,5 @@ dependencies {
// Soft Dependencies
implementation "CraftTweaker2:CraftTweaker2-MC1120-Main:1.12-4.1.20.684"
implementation rfg.deobf("curse.maven:ctm-267602:2915363") // CTM 1.0.2.31
//implementation rfg.deobf("curse.maven:groovyscript-687577:4487379") // GRS 0.4.6
implementation files("libs/groovyscript-0.4.0.jar")
implementation rfg.deobf("curse.maven:groovyscript-687577:4610037") // GRS 0.5.1
}
4 changes: 4 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ minimizeShadowedDependencies = true
# If disabled, won't rename the shadowed classes.
relocateShadowedDependencies = true

# Separate run directories into "run/client" for runClient task, and "run/server" for runServer task.
# Useful for debugging a server and client simultaneously. If not enabled, it will be in the standard location "run/"
separateRunDirectories = false


# Publishing to modrinth requires you to set the MODRINTH_API_KEY environment variable to your current modrinth API token.

Expand Down
Binary file removed libs/groovyscript-0.4.0.jar
Binary file not shown.

0 comments on commit 63c0c00

Please sign in to comment.