From cba6ed9eedd25d138bc4f7e234d3946e2f616a66 Mon Sep 17 00:00:00 2001 From: nathan Date: Sun, 14 Apr 2019 17:06:47 +0200 Subject: [PATCH] Updated dependencies to Utitilies jar. --- build.gradle.kts | 58 ++---------------------------------------------- 1 file changed, 2 insertions(+), 56 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 879fb56..c572bee 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -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 { - val fileList = ArrayList(fileNames.size) - - fileNames.forEach { name -> - fileList.add(name.replace('.', '/') + ".java") - } - - return fileList -} - - -task("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 { } 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") } ///////////////////////////////