Updated dependencies to Utitilies jar.
This commit is contained in:
parent
ea8463ea62
commit
cba6ed9eed
|
@ -145,55 +145,6 @@ repositories {
|
|||
jcenter()
|
||||
}
|
||||
|
||||
///////////////////////////////
|
||||
////// UTILITIES COMPILE
|
||||
///////////////////////////////
|
||||
|
||||
// as long as the 'Utilities' project is ALSO imported into IntelliJ, class resolution will work (add the sources in the intellij project)
|
||||
val utils : Configuration by configurations.creating
|
||||
|
||||
fun javaFile(vararg fileNames: String): Iterable<String> {
|
||||
val fileList = ArrayList<String>(fileNames.size)
|
||||
|
||||
fileNames.forEach { name ->
|
||||
fileList.add(name.replace('.', '/') + ".java")
|
||||
}
|
||||
|
||||
return fileList
|
||||
}
|
||||
|
||||
|
||||
task<JavaCompile>("compileUtils") {
|
||||
// we don't want the default include of **/*.java
|
||||
includes.clear()
|
||||
|
||||
source = fileTree("../Utilities/src")
|
||||
include(javaFile(
|
||||
"dorkbox.util.OS",
|
||||
"dorkbox.util.OSType",
|
||||
"dorkbox.util.Property",
|
||||
"dorkbox.util.IO",
|
||||
"dorkbox.util.FileUtil",
|
||||
"dorkbox.util.FontUtil",
|
||||
|
||||
"dorkbox.util.LocationResolver",
|
||||
"dorkbox.util.ScreenUtil",
|
||||
|
||||
"dorkbox.util.SwingUtil",
|
||||
"dorkbox.util.ImageUtil",
|
||||
"dorkbox.util.MathUtil",
|
||||
|
||||
"dorkbox.util.ActionHandler",
|
||||
"dorkbox.util.ActionHandlerLong"
|
||||
))
|
||||
|
||||
// entire packages/directories
|
||||
include("dorkbox/util/swing/*.java")
|
||||
|
||||
classpath = files(utils)
|
||||
destinationDir = file("$rootDir/build/classes_utilities")
|
||||
}
|
||||
|
||||
///////////////////////////////
|
||||
////// Task defaults
|
||||
///////////////////////////////
|
||||
|
@ -209,9 +160,6 @@ tasks.withType<Jar> {
|
|||
}
|
||||
|
||||
tasks.jar.get().apply {
|
||||
// include applicable class files from subset of Utilities project
|
||||
from((tasks["compileUtils"] as JavaCompile).outputs)
|
||||
|
||||
manifest {
|
||||
// https://docs.oracle.com/javase/tutorial/deployment/jar/packageman.html
|
||||
attributes["Name"] = Extras.name
|
||||
|
@ -234,10 +182,8 @@ tasks.compileJava.get().apply {
|
|||
|
||||
|
||||
dependencies {
|
||||
api("com.dorkbox:TweenEngine:8.3")
|
||||
|
||||
// add compile utils to dependencies
|
||||
implementation(files((tasks["compileUtils"] as JavaCompile).outputs))
|
||||
implementation("com.dorkbox:TweenEngine:8.3")
|
||||
implementation("com.dorkbox:Utilities:1.1")
|
||||
}
|
||||
|
||||
///////////////////////////////
|
||||
|
|
Loading…
Reference in New Issue
Block a user