Skip to content

Commit

Permalink
Merge pull request #43 from chenhaozx/feature/modify-gradle-build
Browse files Browse the repository at this point in the history
Tidy jar dependencies in build.gradle
  • Loading branch information
junqizhang-dev committed Jan 31, 2019
2 parents 7a10fc8 + b7d26ed commit dcd8e07
Showing 1 changed file with 46 additions and 36 deletions.
82 changes: 46 additions & 36 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ apply plugin: 'checkstyle'
apply plugin: "com.github.spotbugs"
apply plugin: 'jacoco'

version = "1.0.4"
version = "1.1.0"

// Specify JDK version - may vary in different scenarios
sourceCompatibility = 1.8
Expand All @@ -33,63 +33,69 @@ repositories {
}

List lombok = [
"org.projectlombok:lombok:1.16.14"
"org.projectlombok:lombok:1.16.14"
]

List logger = [
"org.slf4j:jul-to-slf4j:1.7.10",
"org.apache.logging.log4j:log4j-api:2.1",
"org.apache.logging.log4j:log4j-core:2.1",
"org.apache.logging.log4j:log4j-slf4j-impl:2.1",
"org.apache.logging.log4j:log4j-web:2.1"
"org.slf4j:jul-to-slf4j:1.7.10",
"org.apache.logging.log4j:log4j-api:2.1",
"org.apache.logging.log4j:log4j-core:2.1",
"org.apache.logging.log4j:log4j-slf4j-impl:2.1",
"org.apache.logging.log4j:log4j-web:2.1"
]

def spring_version = "4.1.8.RELEASE"
List spring = [
"org.springframework:spring-core:$spring_version",
"org.springframework:spring-beans:$spring_version",
"org.springframework:spring-context:$spring_version",
"org.springframework:spring-tx:$spring_version",
"org.springframework:spring-jdbc:$spring_version",
"org.springframework:spring-test:$spring_version"
"org.springframework:spring-core:$spring_version",
"org.springframework:spring-beans:$spring_version",
"org.springframework:spring-context:$spring_version",
"org.springframework:spring-tx:$spring_version",
"org.springframework:spring-jdbc:$spring_version",
"org.springframework:spring-test:$spring_version"
]

// junit test
List junit = [
"junit:junit:4.12",
"org.springframework:spring-test:$spring_version"
"junit:junit:4.12",
"org.springframework:spring-test:$spring_version"
]

List apache_commons = [
"org.apache.commons:commons-collections4:4.1",
"org.apache.commons:commons-lang3:3.5",
"commons-cli:commons-cli:1.3.1"
"org.apache.commons:commons-collections4:4.1",
"org.apache.commons:commons-lang3:3.5",
"commons-cli:commons-cli:1.3.1"
]

List jmockit = [
"org.jmockit:jmockit:1.9"
"org.jmockit:jmockit:1.9"
]

// In this section you declare the dependencies for your production and test code
List jackson = [
"com.fasterxml.jackson.core:jackson-databind:2.8.8.1",
"io.netty:netty-all:4.1.15.Final",
"io.netty:netty-tcnative:2.0.0.Final",
"com.google.guava:guava:19.0",
"com.github.fge:json-schema-validator:2.2.6",
"org.apache.httpcomponents:httpclient:4.5.2",
"org.bouncycastle:bcprov-jdk15on:1.54",
"com.lambdaworks:scrypt:1.4.0",
"com.squareup:javapoet:1.7.0",
"io.reactivex:rxjava:1.2.4",
"com.github.jnr:jnr-unixsocket:0.15",
"com.webank:weidentity-contract-java:1.1.0"
"com.fasterxml.jackson.core:jackson-databind:2.8.8.1"
]

List weidentity_contract = [
"com.webank:weidentity-contract-java:1.+"
]

// In this section you declare the dependencies for your production and test code
List web3sdk_dependencies = [
"io.netty:netty-all:4.1.15.Final",
"io.netty:netty-tcnative:2.0.0.Final",
"com.google.guava:guava:19.0",
"com.github.fge:json-schema-validator:2.2.6",
"org.apache.httpcomponents:httpclient:4.5.2",
"org.bouncycastle:bcprov-jdk15on:1.54",
"com.lambdaworks:scrypt:1.4.0",
"com.squareup:javapoet:1.7.0",
"io.reactivex:rxjava:1.2.4",
"com.github.jnr:jnr-unixsocket:0.15"
]

// In this section you declare the dependencies for your production and test code
dependencies {
compile logger, spring, lombok, apache_commons, jackson
testCompile logger, spring, lombok, junit, jmockit
compile logger, spring, lombok, apache_commons, jackson, web3sdk_dependencies, weidentity_contract
testCompile logger, spring, lombok, apache_commons, jackson, web3sdk_dependencies, junit, jmockit
compile files("lib/web3sdk.jar")
}

Expand Down Expand Up @@ -121,10 +127,14 @@ sourceSets {
}
}

processResources {
exclude '**/**'
}

jar {
destinationDir file('dist/app')
archiveName project.name +'-'+version+'.jar'
archiveName project.name + '-' + version + '.jar'

exclude '**/*.xml'
exclude '**/*.properties'

Expand Down

0 comments on commit dcd8e07

Please sign in to comment.