2021-09-24 09:57:22 +00:00
|
|
|
plugins {
|
|
|
|
id 'java-library'
|
|
|
|
}
|
|
|
|
|
|
|
|
group 'com.bdware.sc'
|
|
|
|
version '1.0-SNAPSHOT'
|
|
|
|
|
|
|
|
sourceCompatibility = 1.8
|
|
|
|
|
|
|
|
repositories {
|
2022-04-21 15:21:10 +00:00
|
|
|
mavenLocal()
|
|
|
|
maven { url 'https://maven.aliyun.com/repository/public' }
|
2021-09-24 09:57:22 +00:00
|
|
|
mavenCentral()
|
|
|
|
}
|
|
|
|
|
|
|
|
sourceSets {
|
|
|
|
main {
|
|
|
|
java {
|
|
|
|
srcDirs 'src/main/java', 'src/main/sdk'
|
|
|
|
}
|
|
|
|
resources {
|
|
|
|
srcDir 'src/main/resources'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
test {
|
|
|
|
java {
|
|
|
|
srcDir 'src/test/java'
|
|
|
|
}
|
|
|
|
resources {
|
|
|
|
srcDir 'src/test/resources'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2022-04-21 15:21:10 +00:00
|
|
|
//api 'org.bdware.bdcontract:gmhelper:0.1.0'
|
2021-09-24 09:57:22 +00:00
|
|
|
api project(":gmhelper")
|
|
|
|
api 'javax.websocket:javax.websocket-api:1.1'
|
|
|
|
api 'log4j:log4j:1.2.17'
|
2022-04-21 15:21:10 +00:00
|
|
|
api 'org.apache.logging.log4j:log4j-core:2.17.2'
|
|
|
|
api 'org.apache.logging.log4j:log4j-api:2.17.2'
|
2021-09-24 09:57:22 +00:00
|
|
|
api 'org.glassfish.tyrus.bundles:tyrus-standalone-client:1.17'
|
|
|
|
testImplementation 'junit:junit:4.13.2'
|
|
|
|
}
|
|
|
|
|
|
|
|
jar {
|
|
|
|
String libs = ''
|
|
|
|
configurations.runtimeClasspath.each {
|
|
|
|
libs = libs + " libs/" + it.name
|
|
|
|
}
|
|
|
|
|
|
|
|
manifest {
|
|
|
|
attributes 'Manifest-Version': archiveVersion
|
|
|
|
// attributes 'Main-Class': "com.bdware.client.AutoRegister"
|
|
|
|
attributes 'Class-Path': libs
|
|
|
|
attributes 'Main-Class': 'org.bdware.client.Main'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
task copyJar(type: Copy, dependsOn: [":sdk-java:jar", ":sdk-java:copyLibs"]) {
|
|
|
|
into "./build/output/"
|
|
|
|
from "./build/libs/$project.name-${version}.jar"
|
|
|
|
}
|
|
|
|
|
|
|
|
task copyLibs(type: Copy) {
|
|
|
|
into "./build/output/libs/"
|
|
|
|
from configurations.runtimeClasspath
|
|
|
|
}
|
|
|
|
|
|
|
|
task release(type: Zip, dependsOn: ["copyJar", "copyLibs"]) {
|
|
|
|
from "./build/output/"
|
|
|
|
duplicatesStrategy = DuplicatesStrategy.INCLUDE
|
|
|
|
archiveFileName = "java-client-${projectIds.version}.zip"
|
|
|
|
destinationDirectory = file('build/')
|
|
|
|
}
|