Skip to content

Commit e034d16

Browse files
committed
Updated build.gralde with install option for custom pom file
1 parent 3bbe47d commit e034d16

File tree

2 files changed

+54
-7
lines changed

2 files changed

+54
-7
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,6 @@ build/
2626

2727
gradle.properties
2828
local.properties
29+
30+
# release folder
31+
/release

build.gradle

Lines changed: 51 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,11 @@ allprojects {
2727
apply plugin: 'java'
2828
}
2929

30-
group = 'org.rabbit-converter.Rabbit'
31-
version = '0.0.1'
30+
31+
def siteUrl = 'https://github.com/Rabbit-Converter/Rabbit-Java'
32+
def gitUrl = 'https://github.com/Rabbit-Converter/Rabbit-Java.git'
33+
group = 'org.rabbit-converter.rabbit'
34+
version = '0.0.2'
3235

3336
// In this section you declare the dependencies for your production and test code
3437
dependencies {
@@ -56,16 +59,16 @@ jar {
5659
}
5760

5861
artifacts {
59-
archives sourcesJar
6062
archives javadocJar
63+
archives sourcesJar
6164
}
6265

6366
publishing {
6467
publications {
6568
MyPublication(MavenPublication) {
6669
from components.java
67-
groupId 'org.rabbit-converter'
68-
artifactId 'Rabbit'
70+
groupId 'org.rabbit-converter.rabbit'
71+
artifactId 'rabbit'
6972
version project.version
7073
}
7174
}
@@ -82,9 +85,9 @@ bintray {
8285
repo = 'maven'
8386
name = 'rabbit'
8487
desc = 'Rabbit in Java'
85-
websiteUrl = 'https://github.com/Rabbit-Converter/Rabbit-Java'
88+
websiteUrl = siteUrl
8689
issueTrackerUrl = 'https://github.com/Rabbit-Converter/Rabbit/issues'
87-
vcsUrl = 'https://github.com/Rabbit-Converter/Rabbit-Java.git'
90+
vcsUrl = gitUrl
8891
licenses = ['MIT']
8992
labels = ['java', 'myanmar', 'font-converter', 'zawgyi', 'unicode']
9093
publicDownloadNumbers = true
@@ -93,6 +96,11 @@ bintray {
9396
name = project.version
9497
desc = 'optional, version-specific description'
9598
released = new Date()
99+
gpg {
100+
sign = true //Determines whether to GPG sign the files. The default is false
101+
passphrase = System.getenv('BINTRAY_GPG_PASSWORD')
102+
//Optional. The passphrase for GPG signing'
103+
}
96104
mavenCentralSync {
97105
sync = false
98106
//Optional (true by default). Determines whether to sync the version to Maven Central.
@@ -105,6 +113,42 @@ bintray {
105113
}
106114
}
107115

116+
install {
117+
repositories.mavenInstaller {
118+
// This generates POM.xml with proper parameters
119+
pom {
120+
project {
121+
packaging 'jar'
122+
123+
// Add your description here
124+
name 'rabbit'
125+
description = 'Rabbit in Java'
126+
url siteUrl
127+
128+
// Set your license
129+
licenses {
130+
license {
131+
name 'MIT'
132+
url 'http://opensource.org/licenses/MIT'
133+
}
134+
}
135+
developers {
136+
developer {
137+
id 'yelinaung'
138+
name 'Ye Lin Aung'
139+
email 'me@yelinaung.com'
140+
}
141+
}
142+
scm {
143+
connection gitUrl
144+
developerConnection gitUrl
145+
url siteUrl
146+
}
147+
}
148+
}
149+
}
150+
}
151+
108152
task wrapper(type: Wrapper) {
109153
gradleVersion = '2.4'
110154
}

0 commit comments

Comments
 (0)