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

Fix #47: shadow Guice + Guice extension dependencies #48

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
24 changes: 20 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ buildscript {
classpath 'com.netflix.nebula:gradle-git-scm-plugin:3.0.1'
classpath 'gradle.plugin.org.ysb33r.gradle:gradletest:1.1'
classpath 'gradle.plugin.org.openrepose:gradle-codacy-plugin:1.0.0'
classpath 'com.github.jengelman.gradle.plugins:shadow:4.0.4'
}
}

Expand All @@ -26,6 +27,7 @@ apply plugin: 'nebula.gradle-git-scm'
apply plugin: 'org.ysb33r.gradletest'
apply plugin: 'jacoco'
apply plugin: 'org.openrepose.gradle.plugins.codacy'
apply plugin: 'com.github.johnrengelman.shadow'

repositories {
jcenter()
Expand All @@ -36,10 +38,11 @@ sourceCompatibility = 1.8
targetCompatibility = 1.7

dependencies {
compile gradleApi()
compile localGroovy()
compile 'org.codehaus.groovy:groovy-all:2.4.12'
compile 'org.slf4j:slf4j-api:1.7.6'
shadow gradleApi()
shadow localGroovy()
shadow 'org.codehaus.groovy:groovy-all:2.4.12'
shadow 'org.slf4j:slf4j-api:1.7.6'

compile 'com.google.inject:guice:3.0'
compile 'com.google.inject.extensions:guice-assistedinject:3.0'

Expand All @@ -54,6 +57,13 @@ dependencies {

}

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

tasks.shadowJar.dependsOn tasks.relocateShadowJar

// NOTE: The gradle.publish.key and gradle.publish.secret need added to your ~/.gradle/gradle.properties as per the
// instructions located at https://plugins.gradle.org/docs/submit
pluginBundle {
Expand All @@ -75,6 +85,12 @@ publishing {
mavenJar(MavenPublication) {
from components.java
}
shadow(MavenPublication) {
artifactId = 'gradle-jaxb-plugin-with-deps'
artifact(shadowJar) {
classifier = null
}
}
}

repositories {
Expand Down