plugins { id 'java-library' } sourceCompatibility = 1.8 repositories { mavenCentral() } task copyLibs(type: Copy) { from configurations.runtimeClasspath into "./build/output/libs/" } //task copyJar(type: Exec, dependsOn: [":gmhelper:jar", ":gmhelper:copyLibs"]) { // println("copyJar start") // commandLine "cp", "./build/libs/$project.name-$version" + ".jar", "./build/output/gmhelper.jar" //} task copyJar(type: Copy, dependsOn: [":gmhelper:jar", ":gmhelper:copyLibs"]) { from "./build/libs/$project.name-${project.version}.jar" into "./build/output" rename { String fileName -> "gmhelper.jar" } doFirst { println "copyJar start" } } dependencies { api 'com.google.code.gson:gson:2.8.8' api 'org.bouncycastle:bcpkix-jdk15on:1.69' api 'org.bouncycastle:bcprov-jdk15on:1.69' testImplementation 'junit:junit:4.13.2' }