Skip to content
This repository has been archived by the owner on May 25, 2024. It is now read-only.

Commit

Permalink
Make EIG produce drops as described in the tooltip (bug fixes) (#120)
Browse files Browse the repository at this point in the history
* EIG fixes

* Change polish named variables
  • Loading branch information
kuba6000 authored Mar 28, 2024
1 parent 075b8f6 commit 54cca75
Show file tree
Hide file tree
Showing 7 changed files with 588 additions and 27 deletions.
41 changes: 41 additions & 0 deletions addon.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,44 @@ tasks.named("jar", Jar).configure {
attributes("Main-class": "kubatech.standalone")
}
}


SourceSet functionalTestSet = null

sourceSets {
functionalTestSet = create("functionalTest") {
java {
srcDir("src/functionalTest/java")
compileClasspath += sourceSets.patchedMc.output + sourceSets.main.output
}
}
}

configurations { configs ->
// Keep all dependencies from the main mod in the functional test mod
named(functionalTestSet.compileClasspathConfigurationName).configure {it.extendsFrom(named("compileClasspath").get())}
named(functionalTestSet.runtimeClasspathConfigurationName).configure {it.extendsFrom(named("runtimeClasspath").get())}
named(functionalTestSet.annotationProcessorConfigurationName).configure {it.extendsFrom(named("annotationProcessor").get())}
}

tasks.register(functionalTestSet.jarTaskName, Jar) {
from(functionalTestSet.output)
archiveClassifier.set("functionalTests")
// we don't care about the version number here, keep it stable to avoid polluting the tmp directory
archiveVersion.set("1.0")
destinationDirectory.set(new File(buildDir, "tmp"))
}
tasks.named("assemble").configure {
dependsOn(functionalTestSet.jarTaskName)
}

// Run tests in the default runServer/runClient configurations
tasks.named("runServer", JavaExec).configure {
dependsOn(functionalTestSet.jarTaskName)
classpath(configurations.named(functionalTestSet.runtimeClasspathConfigurationName), tasks.named(functionalTestSet.jarTaskName))
}

tasks.named("runClient", JavaExec).configure {
dependsOn(functionalTestSet.jarTaskName)
classpath(configurations.named(functionalTestSet.runtimeClasspathConfigurationName), tasks.named(functionalTestSet.jarTaskName))
}
7 changes: 7 additions & 0 deletions dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,11 @@ dependencies {
//runtimeOnly("thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev")
//runtimeOnly("com.github.GTNewHorizons:BloodMagic:1.5.1:dev")
//api("curse.maven:witchery-69673:2234410")

testImplementation('junit:junit:4.12')
functionalTestImplementation(platform('org.junit:junit-bom:5.9.2'))
functionalTestImplementation('org.junit.jupiter:junit-jupiter')
functionalTestImplementation('org.junit.platform:junit-platform-engine')
functionalTestImplementation('org.junit.platform:junit-platform-launcher')
functionalTestImplementation('org.junit.platform:junit-platform-reporting')
}
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pluginManagement {
}

plugins {
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.14'
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.19'
}


Loading

0 comments on commit 54cca75

Please sign in to comment.