Changed assets path to be relative to rootProject directory

This commit is contained in:
Collin Smith 2020-11-17 20:09:00 -08:00
parent 6c34cdcf37
commit 2fd6d3bb2c
5 changed files with 20 additions and 24 deletions

View File

@ -4,8 +4,9 @@ import org.apache.tools.ant.taskdefs.condition.Os
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
sourceSets.main.resources.srcDirs += [ rootProject.file('assets').path ]
project.ext.mainClassName = 'com.riiablo.DesktopLauncher'
project.ext.assetsDir = new File('../assets');
dependencies {
implementation project(':core')
@ -22,27 +23,18 @@ task run(dependsOn: classes, type: JavaExec) {
main = project.mainClassName
classpath = sourceSets.main.runtimeClasspath
standardInput = System.in
workingDir = project.assetsDir
workingDir = rootProject.file('assets').path
ignoreExitValue = true
if(Os.isFamily(Os.FAMILY_MAC))
jvmArgs += "-XstartOnFirstThread"
}
task debug(dependsOn: classes, type: JavaExec) {
main = project.mainClassName
classpath = sourceSets.main.runtimeClasspath
standardInput = System.in
workingDir = project.assetsDir
ignoreExitValue = true
debug = true
}
task dist(dependsOn: classes, type: Jar) {
from files(sourceSets.main.output.classesDirs)
from files(sourceSets.main.output.resourcesDir)
from {configurations.compile.collect {zipTree(it)}}
from files(project.assetsDir);
from files(rootProject.file('assets').path);
manifest {
attributes 'Main-Class': project.mainClassName

View File

@ -4,8 +4,9 @@ import org.apache.tools.ant.taskdefs.condition.Os
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
sourceSets.main.resources.srcDirs += [ rootProject.file('assets').path ]
project.ext.mainClassName = 'com.riiablo.map.DS1Viewer'
project.ext.assetsDir = new File('../assets');
project.ext.visuiVersion = '1.4.0'
dependencies {
@ -21,7 +22,7 @@ task run(dependsOn: classes, type: JavaExec) {
main = project.mainClassName
classpath = sourceSets.main.runtimeClasspath
standardInput = System.in
workingDir = project.assetsDir
workingDir = rootProject.file('assets').path
ignoreExitValue = true
if(Os.isFamily(Os.FAMILY_MAC))
@ -32,7 +33,7 @@ task dist(dependsOn: classes, type: Jar) {
from files(sourceSets.main.output.classesDirs)
from files(sourceSets.main.output.resourcesDir)
from { configurations.compile.collect { zipTree(it) } }
from files(project.assetsDir);
from files(rootProject.file('assets').path);
manifest {
attributes 'Main-Class': project.mainClassName

View File

@ -4,8 +4,9 @@ import org.apache.tools.ant.taskdefs.condition.Os
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
sourceSets.main.resources.srcDirs += [ file('assets').path ]
project.ext.mainClassName = 'com.riiablo.mpq.MPQViewer'
project.ext.assetsDir = new File('assets');
project.ext.visuiVersion = '1.4.2'
dependencies {
@ -21,7 +22,7 @@ task run(dependsOn: classes, type: JavaExec) {
main = project.mainClassName
classpath = sourceSets.main.runtimeClasspath
standardInput = System.in
workingDir = project.assetsDir
workingDir = file('assets').path
ignoreExitValue = true
if(Os.isFamily(Os.FAMILY_MAC))
@ -32,7 +33,7 @@ task dist(dependsOn: classes, type: Jar) {
from files(sourceSets.main.output.classesDirs)
from files(sourceSets.main.output.resourcesDir)
from {configurations.compile.collect {zipTree(it)}}
from files(project.assetsDir);
from files(file('assets').path);
manifest {
attributes 'Main-Class': project.mainClassName

View File

@ -4,14 +4,15 @@ import org.apache.tools.ant.taskdefs.condition.Os
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
sourceSets.main.resources.srcDirs += [ rootProject.file('assets').path ]
project.ext.mainClassName = 'com.riiablo.server.d2gs.D2GS'
project.ext.assetsDir = new File('../../assets');
task run(dependsOn: classes, type: JavaExec) {
main = project.mainClassName
classpath = sourceSets.main.runtimeClasspath
standardInput = System.in
workingDir = project.assetsDir
workingDir = rootProject.file('assets').path
ignoreExitValue = true
if(Os.isFamily(Os.FAMILY_MAC))
@ -22,7 +23,7 @@ task dist(dependsOn: classes, type: Jar) {
from files(sourceSets.main.output.classesDirs)
from files(sourceSets.main.output.resourcesDir)
from {configurations.compile.collect {zipTree(it)}}
from files(project.assetsDir);
from files(rootProject.file('assets').path);
manifest {
attributes 'Main-Class': project.mainClassName

View File

@ -4,14 +4,15 @@ import org.apache.tools.ant.taskdefs.condition.Os
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
sourceSets.main.resources.srcDirs += [ rootProject.file('assets').path ]
project.ext.mainClassName = 'com.riiablo.server.d2gs.Main'
project.ext.assetsDir = new File("../../assets");
task run(dependsOn: classes, type: JavaExec) {
main = project.mainClassName
classpath = sourceSets.main.runtimeClasspath
standardInput = System.in
workingDir = project.assetsDir
workingDir = rootProject.file('assets').path
ignoreExitValue = true
}
@ -19,7 +20,7 @@ task dist(dependsOn: classes, type: Jar) {
from files(sourceSets.main.output.classesDirs)
from files(sourceSets.main.output.resourcesDir)
from {configurations.compile.collect {zipTree(it)}}
from files(project.assetsDir);
from files(rootProject.file('assets').path);
manifest {
attributes 'Main-Class': project.mainClassName