-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Modified build script to embed pom.xml in published JAR
- Loading branch information
1 parent
42db664
commit 630a942
Showing
2 changed files
with
48 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,31 +10,66 @@ plugins { | |
|
||
group = 'org.unbroken-dome.gradle-plugins' | ||
archivesBaseName = 'gradle-testsets-plugin' | ||
version = '1.0.0' | ||
version = '1.0.1' | ||
|
||
|
||
sourceCompatibility = '1.8' | ||
targetCompatibility = '1.8' | ||
|
||
|
||
repositories { | ||
mavenCentral() | ||
maven { url 'https://oss.sonatype.org/content/repositories/snapshots' } | ||
} | ||
|
||
|
||
dependencies { | ||
compile gradleApi() | ||
|
||
compile 'com.google.guava:guava:18.0' | ||
|
||
testCompile 'org.codehaus.groovy:groovy-all:2.3.6' | ||
testCompile 'org.spockframework:spock-core:1.0-groovy-2.3-SNAPSHOT' | ||
testCompile ('org.spockframework:spock-core:0.7-groovy-2.0') { | ||
exclude group: 'org.codehaus.groovy' | ||
} | ||
testCompile 'org.hamcrest:hamcrest-all:1.3' | ||
} | ||
|
||
configurations { | ||
all*.exclude module: 'junit-dep' | ||
|
||
def pomDefinition = pom { | ||
project { | ||
name project.friendly_name | ||
packaging 'jar' | ||
description project.description | ||
url project.home_url | ||
|
||
scm { | ||
connection "scm:git:${project.scm_url}" | ||
developerConnection "scm:git:${project.scm_url}" | ||
url project.scm_url | ||
} | ||
|
||
licenses { | ||
license { | ||
name = project.license_name | ||
url project.license_url | ||
} | ||
} | ||
|
||
developers { | ||
developer { | ||
name 'Till Krullmann' | ||
email '[email protected]' | ||
} | ||
} | ||
} | ||
} | ||
|
||
|
||
task generatePom { | ||
outputs.file "$buildDir/poms/pom.xml" | ||
doLast { | ||
pomDefinition.writeTo "$buildDir/poms/pom.xml" | ||
} | ||
} | ||
|
||
|
||
jar { | ||
into("META-INF/maven/$project.group/$project.name") { | ||
from generatePom | ||
} | ||
} | ||
|
||
|
||
|
@@ -67,40 +102,9 @@ eclipse.project { | |
} | ||
|
||
|
||
def pomDefinition = pom { | ||
project { | ||
name project.friendly_name | ||
packaging 'jar' | ||
description project.description | ||
url project.home_url | ||
|
||
scm { | ||
connection "scm:git:${project.scm_url}" | ||
developerConnection "scm:git:${project.scm_url}" | ||
url project.scm_url | ||
} | ||
|
||
licenses { | ||
license { | ||
name = project.license_name | ||
url project.license_url | ||
} | ||
} | ||
|
||
developers { | ||
developer { | ||
name 'Till Krullmann' | ||
email '[email protected]' | ||
} | ||
} | ||
} | ||
} | ||
|
||
|
||
install { | ||
repositories.mavenInstaller { | ||
beforeDeployment { deployment -> signing.signPom(deployment) } | ||
|
||
pom = pomDefinition | ||
} | ||
} | ||
|