mirror of
https://gitee.com/BDWare/sdk-java
synced 2026-02-14 14:59:26 +00:00
initial commit
This commit is contained in:
72
build.gradle
Normal file
72
build.gradle
Normal file
@@ -0,0 +1,72 @@
|
||||
plugins {
|
||||
id 'java-library'
|
||||
}
|
||||
|
||||
group 'com.bdware.sc'
|
||||
version '1.0-SNAPSHOT'
|
||||
|
||||
sourceCompatibility = 1.8
|
||||
|
||||
repositories {
|
||||
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 {
|
||||
api project(":gmhelper")
|
||||
api 'javax.websocket:javax.websocket-api:1.1'
|
||||
api 'log4j:log4j:1.2.17'
|
||||
api 'org.apache.logging.log4j:log4j-core:2.14.1'
|
||||
api 'org.apache.logging.log4j:log4j-api:2.14.1'
|
||||
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/')
|
||||
}
|
||||
Reference in New Issue
Block a user