-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
70 additions
and
24 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,18 @@ | ||
buildscript { | ||
repositories { | ||
jcenter() | ||
} | ||
dependencies { | ||
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.2' | ||
} | ||
} | ||
|
||
apply plugin: 'java' | ||
apply plugin: 'maven-publish' | ||
apply plugin: 'com.jfrog.bintray' | ||
|
||
group = 'org.duckapter' | ||
version = '0.8.0' | ||
version = '0.8.1' | ||
|
||
sourceCompatibility=1.6 | ||
targetCompatibility=1.6 | ||
|
@@ -14,33 +25,68 @@ dependencies { | |
testCompile 'junit:junit:4.8.2' | ||
} | ||
|
||
/* modifyPom { | ||
project { | ||
name 'Duckapter' | ||
description 'Duck typing support for Java' | ||
url 'https://github.com/musketyr/duckapter' | ||
inceptionYear '2009' | ||
jar { | ||
manifest.attributes provider: 'gradle' | ||
} | ||
|
||
scm { | ||
url 'https://github.com/musketyr/duckapter' | ||
connection 'scm:https://[email protected]/musketyr/duckapter.git' | ||
developerConnection 'scm:git://github.com/musketyr/duckapter.git' | ||
} | ||
// publishing | ||
publishing { | ||
publications { | ||
groovyMaven(MavenPublication) { | ||
from components.java | ||
|
||
licenses { | ||
license { | ||
name 'The Apache Software License, Version 2.0' | ||
url 'http://www.apache.org/licenses/LICENSE-2.0.txt' | ||
distribution 'repo' | ||
artifact sourcesJar { | ||
classifier "sources" | ||
} | ||
} | ||
|
||
developers { | ||
developer { | ||
id 'vorany' | ||
name 'Vladimir Orany' | ||
email '[email protected]' | ||
artifact javadocJar { | ||
classifier "javadoc" | ||
} | ||
} | ||
} | ||
}*/ | ||
} | ||
|
||
// set bintrayUser & bintrayKey in gradle.properties | ||
bintray { | ||
|
||
user = getPropertyOrUseDefault('bintrayUser', 'fake_user') | ||
key = getPropertyOrUseDefault('bintrayKey', 'fake_key') | ||
publications = ['groovyMaven'] | ||
|
||
def projectName = project.name | ||
def projectDescription = project.description | ||
|
||
pkg { | ||
websiteUrl = 'https://code.google.com/p/duckapter/' | ||
issueTrackerUrl = 'https://github.com/musketyr/duckapter/issues' | ||
vcsUrl = 'https://github.com/musketyr/duckapter/issues.git' | ||
|
||
repo = 'maven' // or your repo name | ||
userOrg = 'musketyr' | ||
name = projectName // somehow project.* doesn't work in this closure | ||
desc = projectDescription | ||
licenses = ['Apache-2.0'] | ||
} | ||
// dryRun = true // whether to run this as dry-run, without deploying | ||
} | ||
|
||
// custom tasks for creating source/javadoc jars | ||
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, javadocJar | ||
} | ||
|
||
bintrayUpload.dependsOn test | ||
|
||
String getPropertyOrUseDefault(String propertyName, String defaultValue) { | ||
hasProperty(propertyName) ? getProperty(propertyName) : defaultValue | ||
} |