Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

shadowjar plugin added #371

Merged
merged 1 commit into from
Feb 16, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 25 additions & 18 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ plugins {
id 'io.codearte.nexus-staging' version '0.11.0' apply false
id 'com.coditory.integration-test' version "1.0.5"
id 'com.adarshr.test-logger' version '2.1.1'

id 'com.github.johnrengelman.shadow' version '6.1.0'
id 'com.bmuschko.docker-remote-api' version '3.2.1'
}

Expand Down Expand Up @@ -69,40 +69,48 @@ sourceSets {
}

dependencies {
compile gradleApi()
compile localGroovy()
shadow gradleApi()
shadow localGroovy()

compile group: 'org.eclipse.jgit', name: 'org.eclipse.jgit', version: versions.jgit
compile group: 'org.eclipse.jgit', name: 'org.eclipse.jgit.ui', version: versions.jgit
compile group: 'org.eclipse.jgit', name: 'org.eclipse.jgit.ssh.jsch', version: versions.jgit
compile group: 'org.eclipse.jgit', name: 'org.eclipse.jgit.gpg.bc', version: versions.jgit
runtimeOnly group: 'org.eclipse.jgit', name: 'org.eclipse.jgit.ui', version: versions.jgit
runtimeOnly group: 'org.eclipse.jgit', name: 'org.eclipse.jgit.gpg.bc', version: versions.jgit

compile group: 'com.jcraft', name: 'jsch', version: versions.jsch
compile group: 'com.jcraft', name: 'jsch.agentproxy.core', version: versions.jschAgent
compile group: 'com.jcraft', name: 'jsch.agentproxy.jsch', version: versions.jschAgent
compile group: 'com.jcraft', name: 'jsch.agentproxy.sshagent', version: versions.jschAgent
compile group: 'com.jcraft', name: 'jsch.agentproxy.pageant', version: versions.jschAgent
compile group: 'com.jcraft', name: 'jsch.agentproxy.usocket-jna', version: versions.jschAgent
compile group: 'com.jcraft', name: 'jsch.agentproxy.usocket-nc', version: versions.jschAgent
implementation group: 'com.jcraft', name: 'jsch', version: versions.jsch
implementation group: 'com.jcraft', name: 'jsch.agentproxy.core', version: versions.jschAgent
implementation group: 'com.jcraft', name: 'jsch.agentproxy.jsch', version: versions.jschAgent
implementation group: 'com.jcraft', name: 'jsch.agentproxy.sshagent', version: versions.jschAgent
implementation group: 'com.jcraft', name: 'jsch.agentproxy.pageant', version: versions.jschAgent
implementation group: 'com.jcraft', name: 'jsch.agentproxy.usocket-jna', version: versions.jschAgent
implementation group: 'com.jcraft', name: 'jsch.agentproxy.usocket-nc', version: versions.jschAgent

compile group: 'com.github.zafarkhaja', name: 'java-semver', version: '0.9.0'
implementation group: 'com.github.zafarkhaja', name: 'java-semver', version: '0.9.0'

testCompile (group: 'org.ajoberstar.grgit', name: 'grgit-core', version: '4.0.1') {
exclude group: 'org.eclipse.jgit', module: 'org.eclipse.jgit.ui'
exclude group: 'org.eclipse.jgit', module: 'org.eclipse.jgit'
}

testCompile(group: 'org.spockframework', name: 'spock-core', version: '1.0-groovy-2.4') {
exclude group: 'org.codehaus.groovy', module: 'groovy-all'
}
testCompile group: 'org.spockframework', name: 'spock-core', version: '1.3-groovy-2.5'
testCompile group: 'cglib', name: 'cglib-nodep', version: '3.1'
testCompile group: 'org.objenesis', name: 'objenesis', version: '2.4'
testCompile group: 'org.apache.sshd', name: 'sshd-core', version: '1.6.0'
testCompile group: 'org.apache.sshd', name: 'sshd-git', version: '1.6.0'

testImplementation gradleTestKit()
testCompile gradleTestKit()
}

shadowJar {
minimize()
}

task relocateShadowJar(type: com.github.jengelman.gradle.plugins.shadow.tasks.ConfigureShadowRelocation) {
target = tasks.shadowJar
}

tasks.shadowJar.dependsOn tasks.relocateShadowJar

project.configurations {
remoteTest {
extendsFrom project.configurations.testRuntime
Expand Down Expand Up @@ -132,7 +140,6 @@ task stopDockerContainer(type: com.bmuschko.gradle.docker.tasks.container.Docker
targetContainerId { createDockerContainer.getContainerId() }
}


task remoteTest(type: Test) {
testClassesDirs = project.sourceSets.remoteTest.output.classesDirs
classpath = project.sourceSets.main.output +
Expand Down