-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
improved file-not-found handling in Downloader, bumped version to 0.0.12
- Loading branch information
Showing
10 changed files
with
162 additions
and
138 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 |
---|---|---|
|
@@ -12,11 +12,23 @@ buildscript { | |
|
||
ext { | ||
group = 'org.akhikhl.unpuzzle' | ||
version = '0.0.11' | ||
version = '0.0.12' | ||
groovy_version = '1.8.6' | ||
spock_version = '0.7-groovy-1.8' | ||
|
||
project_id = 'unpuzzle' | ||
project_description = 'Tool for mavenizing OSGi-bundles' | ||
developer_id = 'akhikhl' | ||
developer_name = 'Andrey Hihlovskiy' | ||
project_website = "https://github.com/${developer_id}/${project_id}" | ||
project_scm = "scm:[email protected]:${developer_id}/${project_id}.git" | ||
license = 'The MIT License' | ||
license_url = "https://raw.github.com/${developer_id}/${project_id}/master/LICENSE" | ||
labels = ['unpuzzle', 'gradle', 'plugin', 'eclipse', 'osgi', 'maven'] | ||
} | ||
|
||
description = ext.project_description | ||
|
||
apply plugin: 'base' // add "clean" task to the root project. | ||
|
||
task('build') | ||
|
@@ -35,134 +47,3 @@ task('cleanExamples', type: GradleBuild) { task -> | |
|
||
// clean.dependsOn cleanExamples | ||
|
||
subprojects { | ||
if(project.parent.name == 'libs') { | ||
|
||
apply plugin: 'maven' | ||
apply plugin: 'groovy' | ||
apply plugin: 'signing' | ||
apply plugin: 'maven-publish' | ||
apply plugin: 'bintray' | ||
|
||
repositories { | ||
mavenLocal() | ||
jcenter() | ||
mavenCentral() | ||
} | ||
|
||
group = rootProject.ext.group | ||
version = rootProject.ext.version | ||
|
||
dependencies { | ||
compile "org.codehaus.groovy:groovy-all:${rootProject.ext.groovy_version}" | ||
testCompile "org.spockframework:spock-core:${rootProject.ext.spock_version}" | ||
} | ||
|
||
// lib projects should be always installed into "$HOME/.m2" | ||
project.tasks.build.finalizedBy project.tasks.install | ||
rootProject.tasks.buildExamples.dependsOn project.tasks.install | ||
|
||
task sourcesJar(type: Jar, dependsOn: classes, description: 'Creates sources jar') { | ||
classifier = 'sources' | ||
from sourceSets.main.allSource | ||
} | ||
|
||
task javadocJar(type: Jar, description: 'Creates javadoc jar') { | ||
dependsOn javadoc | ||
classifier = 'javadoc' | ||
from javadoc.destinationDir | ||
if(tasks.findByName('groovydoc')) { | ||
dependsOn groovydoc | ||
from groovydoc.destinationDir | ||
} | ||
} | ||
|
||
artifacts { | ||
archives sourcesJar, javadocJar | ||
} | ||
|
||
if(project.hasProperty('publishToSonatype')) { | ||
|
||
assert project.hasProperty('signing.keyId') | ||
assert project.hasProperty('signing.password') | ||
assert project.hasProperty('signing.secretKeyRingFile') | ||
assert project.hasProperty('sonatypeUsername') | ||
assert project.hasProperty('sonatypePassword') | ||
|
||
signing { | ||
sign configurations.archives | ||
} | ||
|
||
uploadArchives { | ||
repositories { | ||
mavenDeployer { | ||
beforeDeployment { deployment -> signing.signPom(deployment) } | ||
|
||
repository(url: 'https://oss.sonatype.org/service/local/staging/deploy/maven2/') { | ||
authentication(userName: project.sonatypeUsername, password: project.sonatypePassword) | ||
} | ||
|
||
pom.project { | ||
name project.name | ||
packaging 'jar' | ||
description 'Tools for mavenizing OSGi-bundles' | ||
url 'https://github.com/akhikhl/unpuzzle' | ||
|
||
scm { | ||
url 'scm:https://github.com/akhikhl/unpuzzle.git' | ||
connection 'scm:https://github.com/akhikhl/unpuzzle.git' | ||
developerConnection 'scm:[email protected]:akhikhl/unpuzzle.git' | ||
} | ||
|
||
licenses { | ||
license { | ||
name 'The MIT License' | ||
url 'https://raw.github.com/akhikhl/unpuzzle/master/license.txt' | ||
distribution 'repo' | ||
} | ||
} | ||
|
||
developers { | ||
developer { | ||
id 'akhikhl' | ||
name 'Andrey Hihlovskiy' | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} // uploadArchives | ||
} // publishToSonatype | ||
|
||
// used by bintray | ||
publishing { | ||
publications { | ||
mavenAll(MavenPublication) { | ||
if (plugins.hasPlugin('java')) { | ||
from components.java | ||
} | ||
artifact sourcesJar { | ||
classifier "sources" | ||
} | ||
artifact javadocJar { | ||
classifier "javadoc" | ||
} | ||
} | ||
} | ||
} // publishing | ||
|
||
bintray { | ||
user = project.hasProperty('bintrayUser') ? project.bintrayUser : '' | ||
key = project.hasProperty('bintrayKey') ? project.bintrayKey : '' | ||
publications = ['mavenAll'] // When uploading Maven-based publication files | ||
pkg { | ||
repo = 'maven' | ||
name = 'unpuzzle' | ||
desc = 'Tools for mavenizing OSGi-bundles' | ||
licenses = ['MIT'] | ||
labels = ['unpuzzle', 'gradle', 'plugin', 'osgi', 'eclipse'] | ||
} | ||
dryRun = false | ||
} | ||
} // if libs | ||
} // subprojects |
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 |
---|---|---|
@@ -0,0 +1,43 @@ | ||
// include this file in subprojects: | ||
// apply from: rootProject.file('libs/common.gradle') | ||
|
||
apply plugin: 'maven' | ||
apply plugin: 'groovy' | ||
|
||
repositories { | ||
mavenLocal() | ||
jcenter() | ||
mavenCentral() | ||
} | ||
|
||
group = rootProject.ext.group | ||
version = rootProject.ext.version | ||
|
||
dependencies { | ||
compile "org.codehaus.groovy:groovy-all:${rootProject.ext.groovy_version}" | ||
testCompile "org.spockframework:spock-core:${rootProject.ext.spock_version}" | ||
} | ||
|
||
// lib projects should be always installed into "$HOME/.m2" | ||
project.tasks.build.finalizedBy project.tasks.install | ||
rootProject.tasks.buildExamples.dependsOn project.tasks.install | ||
|
||
task sourcesJar(type: Jar, dependsOn: classes, description: 'Creates sources jar') { | ||
classifier = 'sources' | ||
from sourceSets.main.allSource | ||
} | ||
|
||
task javadocJar(type: Jar, description: 'Creates javadoc jar') { | ||
dependsOn javadoc | ||
classifier = 'javadoc' | ||
from javadoc.destinationDir | ||
if(tasks.findByName('groovydoc')) { | ||
dependsOn groovydoc | ||
from groovydoc.destinationDir | ||
} | ||
} | ||
|
||
artifacts { | ||
archives sourcesJar, javadocJar | ||
} | ||
|
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 |
---|---|---|
@@ -0,0 +1,70 @@ | ||
// include this file in subprojects: | ||
// apply from: rootProject.file('libs/publish.gradle') | ||
|
||
apply plugin: 'signing' | ||
apply plugin: 'maven-publish' | ||
apply plugin: 'bintray' | ||
|
||
import org.gradle.api.internal.artifacts.publish.DefaultPublishArtifact | ||
|
||
def thisProject = project | ||
|
||
install.repositories.mavenInstaller.pom*.whenConfigured { pom -> | ||
pom.project { | ||
name thisProject.name | ||
packaging 'jar' | ||
description thisProject.project_description | ||
url thisProject.project_website | ||
|
||
scm { | ||
url thisProject.project_scm | ||
connection thisProject.project_scm | ||
developerConnection thisProject.project_scm | ||
} | ||
|
||
licenses { | ||
license { | ||
name thisProject.license | ||
url thisProject.license_url | ||
distribution 'repo' | ||
} | ||
} | ||
|
||
developers { | ||
developer { | ||
id thisProject.developer_id | ||
name thisProject.developer_name | ||
} | ||
} | ||
} | ||
} | ||
|
||
bintray { | ||
user = project.hasProperty('bintrayUser') ? project.bintrayUser : '' | ||
key = project.hasProperty('bintrayKey') ? project.bintrayKey : '' | ||
configurations = ['archives'] | ||
pkg { | ||
repo = 'maven' | ||
name = thisProject.rootProject.project_id | ||
desc = thisProject.rootProject.description | ||
licenses = ['MIT'] | ||
labels = thisProject.rootProject.labels | ||
} | ||
dryRun = false | ||
} | ||
|
||
bintrayUpload { | ||
doFirst { | ||
def signatureArtifacts = [] | ||
collectArtifacts(project.configurations.archives).each { a -> | ||
def s = signing.sign(a.file) | ||
s.signatureFiles.each { f -> | ||
def fname = f.name | ||
def ext = fname.substring(fname.lastIndexOf('.') + 1) | ||
signatureArtifacts.add(new DefaultPublishArtifact(a.name, a.extension + '.' + ext, ext, a.classifier, new Date(), f, [] as Object[])) | ||
} | ||
} | ||
project.configurations.archives.artifacts.addAll(signatureArtifacts) | ||
} | ||
} | ||
|
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 |
---|---|---|
@@ -1,7 +1,8 @@ | ||
apply plugin: 'groovy' | ||
apply from: rootProject.file('libs/common.gradle') | ||
apply from: rootProject.file('libs/publish.gradle') | ||
|
||
dependencies { | ||
compile 'org.osgi:org.osgi.core:5.0.0' | ||
compile 'org.apache.maven:maven-ant-tasks:2.1.3' | ||
testCompile 'xmlunit:xmlunit:1.4' | ||
} | ||
} |
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
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
buildscript { | ||
repositories { | ||
mavenLocal() | ||
jcenter() | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
classpath 'org.akhikhl.unpuzzle:unpuzzle-plugin:0.0.12' | ||
} | ||
} | ||
|
||
// apply plugin: 'unpuzzle-plugin' | ||
|
||
import org.akhikhl.unpuzzle.UnpuzzlePlugin | ||
|
||
if (!project.plugins.findPlugin(UnpuzzlePlugin)) | ||
project.apply(plugin: UnpuzzlePlugin) | ||
|