Skip to content

Commit 9ee3cc5

Browse files
author
Damian Staszewski
committed
build(gradle): fix: missing maven-publish to each modules
1 parent dca9f26 commit 9ee3cc5

File tree

8 files changed

+43
-23
lines changed

8 files changed

+43
-23
lines changed

.travis.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,16 @@ jobs:
2222
- stage: deploy
2323
jdk: openjdk11
2424
install: skip
25-
script: chmod +x ./javadoc.sh && ./javadoc.sh
2625
if: tag IS present
2726
deploy:
2827
provider: pages
29-
local-dir: ./javadoc
28+
local-dir: ./all/build/docs/javadoc
3029
api_key: $GITHUB_OAUTH_TOKEN
3130
skip_cleanup: true
3231
committer-from-gh: true
3332
verbose: true
3433
- stage: deploy
35-
jdk: openjdk8
34+
jdk: openjdk11
3635
install: skip
3736
script: ./gradlew bintrayUpload -x test
3837
if: tag IS present

api/build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ dependencies {
1212
compile "com.fasterxml.jackson.datatype:jackson-datatype-jdk8"
1313

1414
compile "io.reactivex.rxjava2:rxjava:2.2.8"
15-
compile "io.reactivex.rxjava2:rxandroid:2.1.1"
1615

1716
compile "com.squareup.okhttp3:okhttp:3.14.0"
1817
compile "com.squareup.okhttp3:logging-interceptor:3.14.0"

bom/build.gradle

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ def projectList = [
1111

1212
description = "Bills of Materials (BOM) for ${rootProject.name} packages"
1313

14+
bintrayUpload.enabled = true
1415
compileJava.enabled = false
1516
javadoc.enabled = false
1617
tasks.withType(Jar.class) { enabled = false }
@@ -19,8 +20,9 @@ test.enabled = false
1920
dependencyManagement {
2021
dependencies {
2122
projectList.each {
22-
dependency("${it.group}:${it.archivesBaseName}:${it.version}")
23-
}
23+
dependency "${it.group}:${it.archivesBaseName}:${it.version}"
24+
}
25+
dependency "io.reactivex.rxjava2:rxandroid:2.1.1"
2426
}
2527
}
2628

build.gradle

Lines changed: 33 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ allprojects {
3030
subprojects {
3131
apply plugin: "java"
3232
apply plugin: "maven-publish"
33+
apply plugin: "com.jfrog.bintray"
34+
apply plugin: "com.github.johnrengelman.shadow"
3335

3436
sourceCompatibility = targetCompatibility = 1.8
3537

@@ -53,6 +55,11 @@ subprojects {
5355
}
5456
}
5557

58+
shadowJar {
59+
enabled = (name != "BOM")
60+
classifier = "shaded"
61+
}
62+
5663
task sourceJar(type: Jar, dependsOn: classes) {
5764
classifier = "sources"
5865
from sourceSets.main.allSource
@@ -67,6 +74,7 @@ subprojects {
6774
options.incremental = true
6875
options.encoding = "UTF-8"
6976
}
77+
7078
tasks.withType(Jar.class).matching {
7179
mainfest {
7280
attributes = [
@@ -81,31 +89,37 @@ subprojects {
8189
}
8290

8391
artifacts {
84-
archives sourceJar
85-
archives javadocJar
92+
if (project.name != "BOM") {
93+
if (project.name != "all") {
94+
archives sourceJar
95+
}
96+
archives shadowJar
97+
archives javadocJar
98+
}
8699
}
87100

88101
publishing {
89102
publications {
90-
project(MavenPublication) {
103+
maven(MavenPublication) {
91104
artifactId archivesBaseName
92105
if (project.name != "BOM") {
93106
if (project.name != "all") {
94107
from components.java
95108
artifact sourceJar
96109
}
110+
artifact shadowJar
97111
artifact javadocJar
98112
}
99113
pom {
100-
url = "https://github.com/stachu540/hirezapi"
114+
url = "https://github.com/stachu540/HiRezAPI"
101115
inceptionYear = "2019"
102116
issueManagement {
103117
system = "GitHub"
104-
url = "https://github.com/stachu540/hirezapi/issues"
118+
url = "https://github.com/stachu540/HiRezAPI/issues"
105119
}
106120
ciManagement {
107121
system = "Travis-CI"
108-
url = "https://travis-ci.com/stachu540/hirezapi"
122+
url = "https://travis-ci.com/stachu540/HiRezAPI"
109123
}
110124
developers {
111125
developer {
@@ -118,32 +132,32 @@ subprojects {
118132
licenses {
119133
license {
120134
name = "MIT"
121-
url = "https://github.com/stachu540/hirezapi/blob/master/LICENCE.md"
135+
url = "https://github.com/stachu540/HiRezAPI/blob/master/LICENCE.md"
122136
distribution = "repo"
123137
}
124138
}
125139
scm {
126-
connection = "scm:git:https://github.com/stachu540/hirezapi.git"
127-
developerConnection = "scm:git:[email protected]:stachu540/hirezapi.git"
140+
connection = "scm:git:https://github.com/stachu540/HiRezAPI.git"
141+
developerConnection = "scm:git:[email protected]:stachu540/HiRezAPI.git"
128142
url = "https://github.com/stachu540/hirezapi"
129143
}
130144
distributionManagement {
131-
downloadUrl = "https://github.com/stachu540/hirezapi/releases"
145+
downloadUrl = "https://github.com/stachu540/HiRezAPI/releases"
132146
}
133147
}
134148
}
135149
}
136150
}
137151

138-
if (sourceSets.main.allSource.isEmpty() && ["BOM", "all"].contains(project.name)) {
152+
if (sourceSets.main.allSource.isEmpty() && !["bom", "all"].contains(project.name)) {
139153
bintrayUpload.enabled = false
140154
bintrayPublish.enabled = false
141155
}
142156

143157
bintray {
144158
user = bintrayUser
145159
key = bintrayApiKey
146-
publications = ["project"]
160+
publications = ["maven"]
147161
dryRun = false
148162
publish = true
149163
override = false
@@ -154,11 +168,17 @@ subprojects {
154168
desc = rootProject.description
155169
licenses = ["MIT"]
156170
publicDownloadNumbers = true
157-
vcsUrl = "https://github.com/stachu540/hirezapi.git"
171+
vcsUrl = "https://github.com/stachu540/HiRezAPI.git"
158172
version {
159173
name = rootProject.version
160174
vcsTag = "v${rootProject.version}"
161175
released = new Date()
176+
// mavenCentralSync {
177+
// sync = true
178+
// user = sonatypeUser
179+
// password = sonatypePassword
180+
// close = '1'
181+
// }
162182
}
163183
}
164184
}

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
group = com.github.stachu540
2-
version = 3.0.0-SNAPSHOT
2+
version = 3.0.0
33
description = Reactive Java API Wrapper for Hi-Rez Studios games.

paladins/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ plugins {
33
}
44

55
dependencies {
6-
implementation project(":api")
6+
compile project(":api")
77
}

realm/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ plugins {
33
}
44

55
dependencies {
6-
implementation project(":api")
6+
compile project(":api")
77
}

smite/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ plugins {
33
}
44

55
dependencies {
6-
implementation project(":api")
6+
compile project(":api")
77
}

0 commit comments

Comments
 (0)