Open neelgo opened 2 years ago
Just a heads up this project has been untouched for 6 or so years. I think its safe to say its dead.
I can't believe that I just downloaded and tried a project from 6 years ago :joy: miss my university life
I commented unfound packages and changed compile
to implementation
it can build successfully.
But when I run ./gradlew run
, terminal gives me error msg like:
JAVA_HOME is set to an invalid directory: C:\Program Files\Java\jdk-17.0.1\bin Please set the JAVA_HOME variable in your environment to match the location of your Java installation.
My "build" Results: BUILD SUCCESSFUL in 4s 1 actionable task: 1 executed
You can copy and paste to try:
build.gradle(farmism) location: D:\XXX\farmsim
allprojects { group = 'deco2800-2015-farm' version = '0.3142' }
repositories { mavenLocal() mavenCentral() }
subprojects { apply plugin: 'java'; apply plugin: 'eclipse'; apply plugin: 'idea'; apply plugin: 'jacoco'; apply plugin: 'application';
mainClassName = "farmsim.FarmSimLauncher"
repositories { mavenLocal() mavenCentral() }
tasks.withType(Javadoc) { options.addStringOption('Xdoclint:none', '-quiet') } javadoc { options.tags = ['require', 'ensure'] }
sourceSets { uiTest { java { compileClasspath += main.output runtimeClasspath += main.output srcDir 'src/uiTest/java' } } }
configurations { uiTestCompile.extendsFrom testCompile }
task uiTest(type: Test) { // testClassesDir = sourceSets.uiTest.output.classesDir classpath = sourceSets.uiTest.runtimeClasspath
jacoco {
destinationFile = file("$buildDir/jacoco/uiTest.exec")
}
}
test.dependsOn uiTest
//options to force software rendering headlessly test { jvmArgs = [ // Headless Monocle implementation "-Dglass.platform=Monocle", "-Dmonocle.platform=Headless", "-Dprism.order=sw", "-Dprism.verbose=true", "-Dprism.debugFonts=true", // TestFX specific options "-Dtestfx.robot=glass", "-Dtestfx.headless=true" ] jacoco { destinationFile = file("$buildDir/jacoco/test.exec") }
}
uiTest { jvmArgs = [ // Headless Monocle implementation "-Dglass.platform=Monocle", "-Dmonocle.platform=Headless", "-Dprism.order=sw", "-Dprism.verbose=true", "-Dprism.debugFonts=true", // TestFX specific options "-Dtestfx.robot=glass", "-Dtestfx.headless=true" ] }
}
> build.gradle(:farmsim)
> location: D:\XXX\farmsim\farmsim
dependencies { // compile ( // [group: 'org.slf4j', name:'slf4j-api', version: '1.7.12'], // [group: 'org.slf4j', name:'slf4j-log4j12', version: '1.7.12'], // [group: 'org.apache.derby', name: 'derby', version: '10.11.1.1'], // [group: 'org.testfx', name: 'openjfx-monocle', version: '1.8.0_20'], // [group: 'de.jensd', name: 'fontawesomefx', version: '8.6'] // ) // compile group: 'org.slf4j', name:'slf4j-api', version: '1.7.12' implementation group: 'org.slf4j', name:'slf4j-log4j12', version: '1.7.12' implementation group: 'org.apache.derby', name: 'derby', version: '10.11.1.1' implementation group: 'org.testfx', name: 'openjfx-monocle', version: '1.8.0_20' implementation group: 'de.jensd', name: 'fontawesomefx', version: '8.6' implementation group: 'org.glassfish.jersey.core', name:'jersey-client', version: '2.19' implementation group: 'org.glassfish.jersey.media', name:'jersey-media-json-jackson', version: '2.19'
implementation fileTree(dir: 'src/main/libs', include: "**/*.jar")
testCompile (
[group: 'org.mockito', name: 'mockito-all', version: '1.10.19'],
[group: 'org.dbunit', name: 'dbunit', version: '2.5.1'],
[group: 'junit', name: 'junit', version: '4.11'],
[group: 'org.powermock', name: 'powermock-api-mockito', version: '1.6.2'],
[group: 'org.powermock', name: 'powermock-module-junit4', version: '1.6.2'],
[group: 'org.testfx', name: 'openjfx-monocle', version: '1.8.0_20'],
[group: 'org.testfx', name: 'testfx-core', version: '4.0.+'],
[group: 'org.testfx', name: 'testfx-junit', version: '4.0.+']
)
testCompile fileTree(dir: 'src/main/libs', include: "**/*.jar")
//Requires exclusion, let's not add this to the block build
testCompile "org.testfx:testfx-legacy:4.0.+", {
exclude group: "junit", module: "junit"
}
uiTestCompile sourceSets.test.output
uiTestCompile sourceSets.main.output
uiTestCompile configurations.testCompile
// uiTestRuntime configurations.testRuntime// uiTestRuntime configurations.testRuntime }
apply plugin: 'org.flywaydb.flyway' buildscript { repositories { mavenCentral() } dependencies { classpath group: 'org.flywaydb', name: 'flyway-gradle-plugin', version: '3.2.1' } }
task(run2, dependsOn: "classes", type: JavaExec) { main = "farmsim.FarmSimLauncher" classpath = sourceSets.main.runtimeClasspath }
flyway { url = 'jdbc:derby:' + project.projectDir + '/decoFarmDB;user=decofarm;password=decofarm;create=true' }
Can some buddy help me run this as gradle build is failing for me with different error every time? I want to contribute to this game and extend this further, otherwise this game is dead.