Skip to content

Commit

Permalink
compileClasspath
Browse files Browse the repository at this point in the history
  • Loading branch information
kozarezvlad committed Sep 24, 2024
1 parent 83afdc6 commit 12042e0
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 57 deletions.
119 changes: 63 additions & 56 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,21 @@ jar {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
manifest {
attributes('Implementation-Title': 'ic4j-agent',
'Implementation-Version': project.version)
'Implementation-Version': project.version)
}

archiveBaseName = 'ic4j-agent'
}

task fatJar(type: Jar) {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
manifest {
attributes('Implementation-Title': 'ic4j-agent',
'Implementation-Version': project.version)
'Implementation-Version': project.version)
}

archiveBaseName = 'ic4j-agent-with-dependencies'

from { configurations.compileClasspath.collect { it.isDirectory() ? it : zipTree(it) } }
with jar
}
Expand All @@ -57,67 +57,74 @@ tasks.named('shadowJar', ShadowJar) {
archiveBaseName = 'ic4j-agent'
archiveClassifier = ''
relocate 'org.apache.commons', 'shadow.apache.commons'
dependencies {
exclude {
it.moduleGroup == 'org.slf4j' ||
it.moduleGroup == 'org.jetbrains.kotlin' ||
it.moduleGroup == 'org.jetbrains'
}
}
}

test {
useJUnitPlatform()

exclude '**/*ICTest*'
exclude '**/*LoanTest*'
exclude '**/*TradingTest*'
}

dependencies {
implementation group: 'org.ic4j', name: 'ic4j-candid', version: '0.7.1'
// https://mvnrepository.com/artifact/commons-codec/commons-codec
implementation group: 'commons-codec', name: 'commons-codec', version: '1.17.0'
// https://mvnrepository.com/artifact/org.apache.commons/commons-lang3
implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.14.0'

// https://mvnrepository.com/artifact/org.apache.httpcomponents.client5/httpclient5
implementation group: 'org.apache.httpcomponents.client5', name: 'httpclient5', version: '5.3.1'
// https://mvnrepository.com/artifact/com.squareup.okhttp3/okhttp
implementation group: 'com.squareup.okhttp3', name: 'okhttp', version: '4.12.0'
// https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-databind
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.17.2'
// https://mvnrepository.com/artifact/com.fasterxml.jackson.datatype/jackson-datatype-jdk8
implementation group: 'com.fasterxml.jackson.datatype', name: 'jackson-datatype-jdk8', version: '2.17.2'
// https://mvnrepository.com/artifact/com.fasterxml.jackson.dataformat/jackson-dataformat-cbor
implementation group: 'com.fasterxml.jackson.dataformat', name: 'jackson-dataformat-cbor', version: '2.17.2'

// https://mvnrepository.com/artifact/org.bouncycastle/bcprov-jdk18on
implementation group: 'org.bouncycastle', name: 'bcprov-jdk18on', version: '1.78.1'

// https://mvnrepository.com/artifact/org.bouncycastle/bcpkix-jdk18on
implementation group: 'org.bouncycastle', name: 'bcpkix-jdk18on', version: '1.78.1'
// https://mvnrepository.com/artifact/org.slf4j/slf4j-simple
implementation group: 'org.slf4j', name: 'slf4j-simple', version: '2.0.13'

// https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter-api
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: '5.10.0'
// https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter-engine
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: '5.10.0'
// https://mvnrepository.com/artifact/org.junit.platform/junit-platform-launcher
testImplementation group: 'org.junit.platform', name: 'junit-platform-launcher', version: '1.10.0'
// https://mvnrepository.com/artifact/org.skyscreamer/jsonassert
testImplementation group: 'org.skyscreamer', name: 'jsonassert', version: '1.5.1'
// https://mvnrepository.com/artifact/org.mock-server/mockserver-netty
testImplementation group: 'org.mock-server', name: 'mockserver-netty', version: '5.11.2'
// https://mvnrepository.com/artifact/org.mock-server/mockserver-junit-rule
testImplementation group: 'org.mock-server', name: 'mockserver-junit-jupiter', version: '5.11.2'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
shadow group: 'org.ic4j', name: 'ic4j-candid', version: '0.7.1'

// https://mvnrepository.com/artifact/commons-codec/commons-codec
implementation group: 'commons-codec', name: 'commons-codec', version: '1.17.0'

// https://mvnrepository.com/artifact/org.apache.commons/commons-lang3
implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.14.0'

// https://mvnrepository.com/artifact/org.apache.httpcomponents.client5/httpclient5
implementation group: 'org.apache.httpcomponents.client5', name: 'httpclient5', version: '5.3.1'

// https://mvnrepository.com/artifact/com.squareup.okhttp3/okhttp
shadow group: 'com.squareup.okhttp3', name: 'okhttp', version: '4.12.0'

// https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-databind
shadow group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.17.2'

// https://mvnrepository.com/artifact/com.fasterxml.jackson.datatype/jackson-datatype-jdk8
shadow group: 'com.fasterxml.jackson.datatype', name: 'jackson-datatype-jdk8', version: '2.17.2'

// https://mvnrepository.com/artifact/com.fasterxml.jackson.dataformat/jackson-dataformat-cbor
shadow group: 'com.fasterxml.jackson.dataformat', name: 'jackson-dataformat-cbor', version: '2.17.2'

// https://mvnrepository.com/artifact/org.bouncycastle/bcprov-jdk18on
shadow group: 'org.bouncycastle', name: 'bcprov-jdk18on', version: '1.78.1'

// https://mvnrepository.com/artifact/org.bouncycastle/bcpkix-jdk18on
shadow group: 'org.bouncycastle', name: 'bcpkix-jdk18on', version: '1.78.1'

// https://mvnrepository.com/artifact/org.slf4j/slf4j-simple
shadow group: 'org.slf4j', name: 'slf4j-simple', version: '2.0.13'

// https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter-api
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: '5.10.0'

// https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter-engine
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: '5.10.0'

// https://mvnrepository.com/artifact/org.junit.platform/junit-platform-launcher
testImplementation group: 'org.junit.platform', name: 'junit-platform-launcher', version: '1.10.0'

// https://mvnrepository.com/artifact/org.skyscreamer/jsonassert
testImplementation group: 'org.skyscreamer', name: 'jsonassert', version: '1.5.1'

// https://mvnrepository.com/artifact/org.mock-server/mockserver-netty
testImplementation group: 'org.mock-server', name: 'mockserver-netty', version: '5.11.2'

// https://mvnrepository.com/artifact/org.mock-server/mockserver-junit-rule
testImplementation group: 'org.mock-server', name: 'mockserver-junit-jupiter', version: '5.11.2'
shadow "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
}

kotlin {
Expand Down
3 changes: 2 additions & 1 deletion upload-github.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
apply plugin: 'maven-publish'
apply plugin: 'com.gradleup.shadow'

afterEvaluate {
publishing {
Expand All @@ -9,7 +10,7 @@ afterEvaluate {
artifactId = "$project.artifactId"
version = "$project.artifactVersion"

artifact shadowJar
from components.shadow
// from components.java

pom.withXml {
Expand Down

0 comments on commit 12042e0

Please sign in to comment.