Permalink
Browse files

Shipkit pom customizations (#831)

Fixes #826
* Initial configuration of Shipkit
* Introduced shipkit format of developers section in pom #826
* Issues section removed from publish-maven.gradle #826
* Removed redundant packaging and description #826
* Shipkit version bumped and prefix 'powermock-' used instead of 'v' #826
* Disabled redundant tasks for unpublishable modules #826
* MIT licence replaced with Apache one #826
* Publishing separately fullJars/zips and jars #826
* Compilation fixed #826
* Finished pom configuration #826
  • Loading branch information...
wwilk authored and thekingnothing committed Aug 26, 2017
1 parent 7f4454a commit f4bfb7813536886507f2bd35a9bfa23653352f4c
View
@@ -14,7 +14,7 @@ buildscript {
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
classpath 'net.researchgate:gradle-release:2.4.0'
classpath 'com.github.jengelman.gradle.plugins:shadow:1.2.4'
classpath 'org.shipkit:shipkit:0.9.2'
classpath 'org.shipkit:shipkit:0.9.45'
classpath 'ru.vyarus:gradle-animalsniffer-plugin:1.4.1'
}
}
View
@@ -5,16 +5,37 @@ configure(publishableModules) { project ->
apply from: "${gradleScriptDir}/publishing/publishable-module.gradle"
}
def unpublishableModules = allprojects - publishableModules
def skippedTasksForUnpublishableModules = [
'generatePomFileForJavaLibraryPublication',
'publishJavaLibraryPublicationToMavenLocal',
'javadoc',
'javadocJar',
'sourcesJar',
'bintrayUpload'
]
def unpublishableModules = allprojects - publishableModules - project(":powermock-release").subprojects
configure(unpublishableModules) { project ->
project.tasks.all {
if (it.name == 'publishJavaLibraryPublicationToMavenLocal') {
if(skippedTasksForUnpublishableModules.contains(it.name)) {
it.enabled = false
}
if (it.name == 'javadoc') {
it.enabled = false
}
if (it.name == 'bintrayUpload') {
}
}
def skippedTasksForGenericModules = [
'generatePomFileForJavaLibraryPublication',
'publishJavaLibraryPublicationToMavenLocal',
'jar',
'javadoc',
'javadocJar',
'sourcesJar'
]
def genericModules = project(":powermock-release").subprojects
configure(genericModules) { project ->
project.tasks.all {
if(skippedTasksForGenericModules.contains(it.name)) {
it.enabled = false
}
}
@@ -1,49 +1,31 @@
apply plugin: 'maven-publish'
//publishing {
// publications {
// modulesJar(MavenPublication) {
// from components.java
// artifactId project.name
// artifact sourcesJar
// artifact javadocJar
// }
// }
//}
publishing.publications.all {
//def devs = ['johanhaleby:Johan Haleby:johan.haleby at jayway.com', 'jakr:Jan Kronquist:jan.kronquist at jayway.com', 'thekingnothing:Arthur Zagretdinov:arthur.zagretdinov at outlook.com']
def devs = ['johanhaleby:Johan Haleby:johan.haleby at jayway.com', 'jakr:Jan Kronquist:jan.kronquist at jayway.com', 'thekingnothing:Arthur Zagretdinov:arthur.zagretdinov at outlook.com']
pom.withXml {
def root = asNode()
// root.appendNode('name', 'PowerMock')
// root.appendNode('packaging', 'jar')
// root.appendNode('description', project.description)
// root.appendNode('url', 'http://www.powermock.org')
root.remove(root.get('name'))
root.appendNode('name', 'PowerMock')
// def license = root.appendNode('licenses').appendNode('license')
// license.appendNode('name', 'The Apache Software License, Version 2.0')
// license.appendNode('url', 'http://www.apache.org/licenses/LICENSE-2.0.txt')
// license.appendNode('distribution', 'repo')
//
// def scm = root.appendNode('scm')
// scm.appendNode('url', 'http://github.com/mockito/mockito')
// scm.appendNode('connection', 'scm:git:git://github.com/powermock/powermock')
// scm.appendNode('developerConnection', 'scm:git:git://github.com/powermock/powermock')
root.remove(root.get('url'))
root.appendNode('url', 'http://www.powermock.org')
// def issues = root.appendNode('issueManagement')
// issues.appendNode('url', 'https://github.com/powermock/powermock/issues')
// issues.appendNode('system', 'GitHub')
root.remove(root.get('licenses'))
def license = root.appendNode('licenses').appendNode('license')
license.appendNode('name', 'The Apache Software License, Version 2.0')
license.appendNode('url', 'http://www.apache.org/licenses/LICENSE-2.0.txt')
license.appendNode('distribution', 'repo')
// def developers = root.appendNode('developers')
// devs.each {
// def split = it.split(':')
// assert split.length == 3
// def d = developers.appendNode('developer')
// d.appendNode('id', split[0])
// d.appendNode('name', split[1])
// d.appendNode('email', split[2])
// }
def developers = root.appendNode('developers')
devs.each {
def split = it.split(':')
assert split.length == 3
def d = developers.appendNode('developer')
d.appendNode('id', split[0])
d.appendNode('name', split[1])
d.appendNode('email', split[2])
}
root.dependencies.'*'.findAll() {
it.scope.text() == 'runtime' && project.configurations.compile.allDependencies.find { dep ->
@@ -1,29 +1,13 @@
apply plugin: 'com.jfrog.bintray'
def versionDescription = "PowerMock ${project.version} Final"
if (project.version.toString().contains("beta")){
versionDescription = "PowerMock ${project.version} Develop"
}
bintray {
//user = System.getenv('BINTRAY_USER')
//key = System.getenv('BINTRAY_API_KEY')
publish = project.ext.bintrayAutoPublish
pkg {
//repo = project.ext.bintrayRepo
//name = 'powermock'
//userOrg ='powermock'
//desc = project.description
//websiteUrl = 'http://powermock.org'
//issueTrackerUrl = 'https://powermock.com/powermock/powermock/issues'
//vcsUrl = 'https://github.com/powermock/powermock.git'
//licenses = ['Apache-2.0']
//labels = ['java', 'mock', 'mocking', 'tests']
publicDownloadNumbers = true
repo = project.ext.bintrayRepo
// optional version attributes
version {
@@ -1,5 +1,5 @@
ext {
//bintrayRepo = 'maven'
bintrayRepo = 'maven'
bintrayAutoPublish = true
mavenCentralSync = true
bintrayPublications = ['javaLibrary']
@@ -29,16 +29,6 @@ javadoc {
failOnError = false
}
//task sourcesJar(type: Jar, dependsOn: classes) {
// classifier = 'sources'
// from sourceSets.main.allSource
//}
//task javadocJar(type: Jar, dependsOn: javadoc) {
// classifier = 'javadoc'
// from javadoc.destinationDir
//}
artifacts {
archives sourcesJar
archives javadocJar
View
@@ -5,6 +5,8 @@ shipkit {
//TODO when you finish trying out Shipkit, use your own token below (http://link/needed)
gitHub.readOnlyAuthToken = "76826c9ec886612f504d12fd4268b16721c4f85d"
git.tagPrefix = "powermock-"
releaseNotes.file = "release-notes.md"
releaseNotes.ignoreCommitsContaining = ["[ci skip]"]
}
@@ -13,14 +15,25 @@ allprojects {
plugins.withId("org.shipkit.bintray") {
//TODO when you finish trying out Shipkit, use your own Bintray repository below (http://link/needed)
bintray {
key = '7ea297848ca948adb7d3ee92a83292112d7ae989'
user = System.getenv('BINTRAY_USER')
// key = '7ea297848ca948adb7d3ee92a83292112d7ae989'
pkg {
repo = 'bootstrap'
user = 'shipkit-bootstrap-bot'
userOrg = 'shipkit-bootstrap'
name = 'maven'
licenses = ['MIT']
labels = ['continuous delivery', 'release automation', 'shipkit']
// repo = 'bootstrap'
// user = 'shipkit-bootstrap-bot'
// userOrg = 'shipkit-bootstrap'
userOrg ='powermock'
name = 'powermock'
desc = project.description
websiteUrl = 'http://powermock.org'
issueTrackerUrl = 'https://powermock.com/powermock/powermock/issues'
vcsUrl = 'https://github.com/powermock/powermock.git'
licenses = ['Apache-2.0']
labels = ['java', 'mock', 'mocking', 'tests']
publicDownloadNumbers = true
}
}
}
View
@@ -1,5 +1,5 @@
#Currently building version
version=1.7.2
version=1.7.1
#Prevoius version used to generate release notes delta
previousVersion=1.7.0

0 comments on commit f4bfb78

Please sign in to comment.