@@ -30,6 +30,8 @@ allprojects {
3030subprojects {
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 }
0 commit comments