Archived
0

Merge remote-tracking branch 'origin/proto_1.12.2' into event

This commit is contained in:
2019-01-12 21:46:51 +03:00

View File

@@ -1,3 +1,6 @@
import java.nio.file.Files
import java.nio.file.Paths
buildscript {
repositories {
maven { url "https://plugins.gradle.org/m2/" }
@@ -84,6 +87,43 @@ subprojects {
task cleanDep(type: Delete) {
delete 'libs'
}
/**
* Сборка
*/
task deploy() {
dependsOn { jar }
doLast {
def deployDir = System.getProperty("deploy")
if (deployDir == null) {
println "Need param -Ddeploy=path/to/deploy"
throw new Exception("Need param -Ddir=path/to/deploy")
}
def target = Paths.get(deployDir, jar.archivePath.getName())
if (Files.notExists(target)) {
println jar.archivePath
Files.copy(jar.archivePath.toPath(), target)
}
def libsDir = System.getProperty("libs", deployDir+File.separator+"libs")
if (Files.notExists(Paths.get(libsDir))) {
(new File(libsDir)).mkdirs()
}
def libsCollection = configurations.compile + configurations.runtime - configurations.compile_excludeCopy
libsCollection.each{ libFile ->
target = Paths.get(libsDir, libFile.getName())
if (Files.notExists(target)) {
println libFile
Files.copy(libFile.toPath(), target)
}
}
}
}
}
/**