Created
October 29, 2017 18:45
-
-
Save ictrobot/7013a42341a5741b6a7eda5a4c21f90d to your computer and use it in GitHub Desktop.
Cubes - Separate out client dependencies
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
task cubesDist(dependsOn: classes, type: Jar) { | |
from files(sourceSets.main.java.outputDir) | |
from files(sourceSets.main.output.resourcesDir) | |
from { configurations.compile.resolvedConfiguration.resolvedArtifacts.findResults { it.id.componentIdentifier instanceof ProjectComponentIdentifier ? zipTree(it.getFile()) : null }} | |
from files(project.assetsDir) | |
archiveName = 'client.jar' | |
manifest { | |
attributes 'Main-Class': project.mainClassName | |
} | |
} | |
task dependenciesFolder(dependsOn: classes) { | |
doLast { | |
copy { | |
into "build/dependencies/" | |
for (c in configurations.compile.resolvedConfiguration.resolvedArtifacts) { | |
if (c.id.componentIdentifier instanceof ProjectComponentIdentifier) continue | |
//println(c.getFile().parent) | |
from(c.getFile().parent) { | |
include(c.getFile().name) | |
rename(c.getFile().name, c.id.componentIdentifier.group + "-" + c.id.componentIdentifier.module + "-" + c.id.componentIdentifier.version + (c.classifier != null ? "-" + c.classifier : "") + ".jar") | |
} | |
} | |
} | |
for (c in configurations.compile.resolvedConfiguration.resolvedArtifacts) { | |
println(c.id.componentIdentifier.toString() + " "+c.id.componentIdentifier.class.toString()) | |
} | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
├───dependencies | |
│ com.badlogicgames.gdx-gdx-1.9.7.jar | |
│ com.badlogicgames.gdx-gdx-backend-lwjgl3-1.9.7.jar | |
│ com.badlogicgames.gdx-gdx-freetype-1.9.7.jar | |
│ com.badlogicgames.gdx-gdx-freetype-platform-1.9.7-natives-desktop.jar | |
│ com.badlogicgames.gdx-gdx-platform-1.9.7-natives-desktop.jar | |
│ com.badlogicgames.jlayer-jlayer-1.0.1-gdx.jar | |
│ com.eclipsesource.minimal-json-minimal-json-0.9.4.jar | |
│ ethanjones-data-2.2.jar | |
│ net.bytebuddy-byte-buddy-1.6.13.jar | |
│ org.jcraft-jorbis-0.0.17.jar | |
│ org.luaj-luaj-jse-3.0.1.jar | |
│ org.lwjgl-lwjgl-3.1.3-natives-linux.jar | |
│ org.lwjgl-lwjgl-3.1.3-natives-macos.jar | |
│ org.lwjgl-lwjgl-3.1.3-natives-windows.jar | |
│ org.lwjgl-lwjgl-3.1.3.jar | |
│ org.lwjgl-lwjgl-glfw-3.1.3-natives-linux.jar | |
│ org.lwjgl-lwjgl-glfw-3.1.3-natives-macos.jar | |
│ org.lwjgl-lwjgl-glfw-3.1.3-natives-windows.jar | |
│ org.lwjgl-lwjgl-glfw-3.1.3.jar | |
│ org.lwjgl-lwjgl-jemalloc-3.1.3-natives-linux.jar | |
│ org.lwjgl-lwjgl-jemalloc-3.1.3-natives-macos.jar | |
│ org.lwjgl-lwjgl-jemalloc-3.1.3-natives-windows.jar | |
│ org.lwjgl-lwjgl-jemalloc-3.1.3.jar | |
│ org.lwjgl-lwjgl-openal-3.1.3-natives-linux.jar | |
│ org.lwjgl-lwjgl-openal-3.1.3-natives-macos.jar | |
│ org.lwjgl-lwjgl-openal-3.1.3-natives-windows.jar | |
│ org.lwjgl-lwjgl-openal-3.1.3.jar | |
│ org.lwjgl-lwjgl-opengl-3.1.3-natives-linux.jar | |
│ org.lwjgl-lwjgl-opengl-3.1.3-natives-macos.jar | |
│ org.lwjgl-lwjgl-opengl-3.1.3-natives-windows.jar | |
│ org.lwjgl-lwjgl-opengl-3.1.3.jar | |
│ | |
└───libs | |
client.jar |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment