Revision | c23c56a63653e05f698a0a26703567ec3b8a7a14 (tree) |
---|---|
Zeit | 2016-04-25 14:55:03 |
Autor | Hiroshi Miura <miurahr@linu...> |
Commiter | Hiroshi Miura |
Release on Bintray
Signed-off-by: Hiroshi Miura <miurahr@linux.com>
@@ -11,6 +11,8 @@ subprojects { | ||
11 | 11 | apply plugin: 'jacoco' |
12 | 12 | apply plugin: 'checkstyle' |
13 | 13 | apply plugin: 'findbugs' |
14 | + apply plugin: 'co.riiid.gradle' | |
15 | + apply plugin: 'com.jfrog.bintray' | |
14 | 16 | |
15 | 17 | sourceCompatibility = jdkVersion |
16 | 18 | targetCompatibility = jdkVersion |
@@ -47,15 +49,50 @@ subprojects { | ||
47 | 49 | test { |
48 | 50 | useTestNG() |
49 | 51 | } |
52 | + | |
53 | + task sourceJar(type: Jar) { | |
54 | + from sourceSets.main.allSource | |
55 | + classifier = 'sources' | |
56 | + } | |
57 | + | |
58 | + task javadocJar(type: Jar, dependsOn: javadoc) { | |
59 | + description 'Generate jar file that have javadoc' | |
60 | + classifier = 'javadoc' | |
61 | + from javadoc.destinationDir | |
62 | + } | |
63 | + | |
64 | + artifacts { | |
65 | + archives jar | |
66 | + archives sourceJar | |
67 | + archives javadocJar | |
68 | + } | |
50 | 69 | } |
51 | 70 | |
52 | 71 | group = projectGroup |
53 | -version = projectVersion | |
54 | 72 | |
55 | 73 | project(':dictzip-lib') { |
56 | 74 | dependencies { |
57 | 75 | testCompile 'tokyo.northside:northside-io:0.2.0' |
58 | 76 | } |
77 | + version = projectVersion | |
78 | + bintray { | |
79 | + user = project.hasProperty('bintrayUser') ? project.property('bintrayUser') : System.getenv('BINTRAY_USER') | |
80 | + key = project.hasProperty('bintrayApiKey') ? project.property('bintrayApiKey') : System.getenv('BINTRAY_API_KEY') | |
81 | + configurations = ['archives'] | |
82 | + pkg { | |
83 | + repo = 'maven' | |
84 | + name = 'dictzip-lib' | |
85 | + licenses = ['GPL-2.0+CE'] | |
86 | + vcsUrl = projectUrl | |
87 | + labels = ['java','dictzip'] | |
88 | + publicDownloadNumbers = true | |
89 | + version { | |
90 | + name = projectVersion | |
91 | + desc = projectDesc | |
92 | + vcsTag = projectTag | |
93 | + } | |
94 | + } | |
95 | + } | |
59 | 96 | } |
60 | 97 | |
61 | 98 | project(':dictzip-cli') { |
@@ -69,10 +106,28 @@ project(':dictzip-cli') { | ||
69 | 106 | 'gnu.getopt:java-getopt:1.0.13' |
70 | 107 | testCompile 'tokyo.northside:northside-io:0.2.0' |
71 | 108 | } |
109 | + version = projectVersion | |
110 | + bintray { | |
111 | + user = project.hasProperty('bintrayUser') ? project.property('bintrayUser') : System.getenv('BINTRAY_USER') | |
112 | + key = project.hasProperty('bintrayApiKey') ? project.property('bintrayApiKey') : System.getenv('BINTRAY_API_KEY') | |
113 | + configurations = ['archives'] | |
114 | + pkg { | |
115 | + repo = 'maven' | |
116 | + name = 'dictzip-cli' | |
117 | + licenses = ['GPL-3.0'] | |
118 | + vcsUrl = projectUrl | |
119 | + labels = ['java','dictzip'] | |
120 | + publicDownloadNumbers = true | |
121 | + version { | |
122 | + name = projectVersion | |
123 | + desc = projectDesc | |
124 | + vcsTag = projectTag | |
125 | + } | |
126 | + } | |
127 | + } | |
72 | 128 | } |
73 | 129 | |
74 | -if (gradle.startParameter.taskNames.contains('uploadArchives') || | |
75 | - gradle.startParameter.taskNames.contains('bintrayUpload') || | |
76 | - gradle.startParameter.taskNames.contains('githubRelease)) { | |
130 | +if (gradle.startParameter.taskNames.contains('bintrayUpload') || | |
131 | + gradle.startParameter.taskNames.contains('githubRelease')) { | |
77 | 132 | apply from: 'build.publish.gradle' |
78 | 133 | } |
@@ -1,4 +1,3 @@ | ||
1 | -apply plugin: 'maven' | |
2 | 1 | apply plugin: 'signing' |
3 | 2 | |
4 | 3 | boolean validProperty(propertyName) { |
@@ -7,8 +6,6 @@ boolean validProperty(propertyName) { | ||
7 | 6 | } |
8 | 7 | assert validProperty('signing.keyId'), 'properties for signing must be provided' |
9 | 8 | assert validProperty('signing.secretKeyRingFile'), 'properties for signing must be provided' |
10 | -assert validProperty('sonatypeUsername'), 'properties for publish must be provided' | |
11 | -assert validProperty('sonatypeFullname'), 'properties for publish must be provided' | |
12 | 9 | |
13 | 10 | String askPassword(prompt) { |
14 | 11 | "${System.console().readPassword(prompt)}" |
@@ -19,25 +16,6 @@ signing { | ||
19 | 16 | sign configurations.archives |
20 | 17 | } |
21 | 18 | |
22 | -bintray { | |
23 | - user = project.hasProperty('bintrayUser') ? project.property('bintrayUser') : System.getenv('BINTRAY_USER') | |
24 | - key = project.hasProperty('bintrayApiKey') ? project.property('bintrayApiKey') : System.getenv('BINTRAY_API_KEY') | |
25 | - configurations = ['archives'] | |
26 | - pkg { | |
27 | - repo = 'maven' | |
28 | - name = 'dictzip' | |
29 | - licenses = ['GPL-3'] | |
30 | - vcsUrl = projectUrl | |
31 | - labels = ['java','dictzip'] | |
32 | - publicDownloadNumbers = true | |
33 | - version { | |
34 | - name = projectVersion | |
35 | - desc = projectDesc | |
36 | - vcsTag = projectTag | |
37 | - } | |
38 | - } | |
39 | -} | |
40 | - | |
41 | 19 | github { |
42 | 20 | owner = projectOwner |
43 | 21 | repo = 'dictzip-java' |
@@ -48,45 +26,7 @@ github { | ||
48 | 26 | draft = true |
49 | 27 | body = projectReleaseBody |
50 | 28 | assets = [ |
51 | - 'build/libs/dictzip-cli.jar', | |
52 | - 'build/libs/dictzip-cli.jar.asc', | |
53 | - 'build/libs/dictzip-lib.jar', | |
54 | - 'build/libs/dictzip-lib.jar.asc', | |
55 | - 'build/libs/dictzip-javadoc.jar', | |
56 | - 'build/libs/dictzip-javadoc.jar.asc', | |
57 | - 'build/libs/dictzip-source.jar', | |
58 | - 'build/libs/dictzip-source.jar.asc' | |
29 | + 'dictzip-cli/build/distributions/DictZip.zip', | |
30 | + 'dictzip-lib/build/libs/dictzip-lib.jar' | |
59 | 31 | ] |
60 | 32 | } |
61 | - | |
62 | -uploadArchives { | |
63 | - repositories.mavenDeployer { | |
64 | - repository url: "file://$System.env.HOME/.m2/repository" | |
65 | - beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) } | |
66 | - pom.project { | |
67 | - name project.name | |
68 | - packaging 'jar' | |
69 | - description projectDesc | |
70 | - url projectUrl | |
71 | - version projectVersion | |
72 | - licenses { | |
73 | - license { | |
74 | - name 'GNU General Public License version 3.0 with classpath link exception.' | |
75 | - distribution 'repo' | |
76 | - } | |
77 | - } | |
78 | - scm { | |
79 | - url githubUrl | |
80 | - connection "scm:git:${githubUrl}" | |
81 | - developerConnection "scm:git:${githubUrl}" | |
82 | - } | |
83 | - developers { | |
84 | - developer { | |
85 | - id 'miurahr' | |
86 | - name 'Hiroshi Miura' | |
87 | - email 'miurahr@linux.com' | |
88 | - } | |
89 | - } | |
90 | - } | |
91 | - } | |
92 | -} |