@@ -27,23 +27,18 @@ buildscript {
2727 jcenter()
2828 }
2929
30- dependencies {
31- classpath ' com.palantir:jacoco-coverage:0.4.0'
32- classpath " com.smokejumperit.gradle.license:Gradle-License-Report:0.0.2"
33- classpath ' com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
34- }
30+ dependencies {
31+ classpath ' com.palantir:jacoco-coverage:0.4.0'
32+ classpath " com.smokejumperit.gradle.license:Gradle-License-Report:0.0.2"
33+ classpath ' com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
34+ }
3535}
3636
37- allprojects {
38- repositories {
39- jcenter()
40- }
41- apply plugin : ' java'
42- apply plugin : ' maven'
43- apply plugin : ' maven-publish'
44- apply plugin : ' com.palantir.jacoco-coverage'
45- apply plugin : ' com.jfrog.bintray'
46- }
37+ apply plugin : ' java'
38+ apply plugin : ' maven'
39+ apply plugin : ' com.palantir.jacoco-coverage'
40+ apply plugin : ' maven-publish'
41+ apply plugin : ' com.jfrog.bintray'
4742
4843group = ' com.sybit'
4944version = getVersionName()
@@ -69,10 +64,9 @@ configurations {
6964
7065dependencies {
7166 compile group : ' com.mashape.unirest' , name : ' unirest-java' , version :' 1.4.9'
72- compile group : ' org.apache.httpcomponents' , name : ' httpclient' , version :' 4.5.2'
73- compile group : ' org.apache.httpcomponents' , name : ' httpmime' , version :' 4.5.1'
67+ compile group : ' org.apache.httpcomponents' , name : ' httpclient' , version :' 4.5.3'
7468 compile group : ' org.json' , name : ' json' , version :' 20160810'
75- compile group : ' com.google.code.gson' , name : ' gson' , version :' 2.5 '
69+ compile group : ' com.google.code.gson' , name : ' gson' , version :' 2.8.0 '
7670 compile group : ' commons-beanutils' , name : ' commons-beanutils' , version :' 1.9.3'
7771 compile group : ' commons-io' , name : ' commons-io' , version :' 2.5'
7872 compile group : ' org.slf4j' , name : ' slf4j-api' , version :' 1.7.25'
@@ -101,7 +95,6 @@ artifacts {
10195 archives sourcesJar, javadocJar
10296}
10397
104- // task to send coverage data to Codacy
10598task sendCoverageToCodacy (type : JavaExec , dependsOn : jacocoTestReport) {
10699 main = " com.codacy.CodacyCoverageReporter"
107100 classpath = configurations. codacy
@@ -116,39 +109,25 @@ task sendCoverageToCodacy(type: JavaExec, dependsOn: jacocoTestReport) {
116109
117110publishing {
118111 publications {
119-
120- MyPublication (MavenPublication ) {
121- // we have to change scope from runtime to compile. Especially for Gson-lib.
122- pom. withXml {
123- asNode(). dependencies. ' *' . findAll() {
124- it. scope. text() == ' runtime' && project. configurations. compile. allDependencies. find { dep ->
125- dep. name == it. artifactId. text()
126- }
127- }. each { it. scope* . value = ' compile' }
128- }
129-
112+ mavenJava(MavenPublication ) {
130113 if (plugins. hasPlugin(' war' )) {
131114 from components. web
132115 } else {
133116 from components. java
134117 }
135- groupId group
136- artifactId rootProject. name
137- version getVersionName()
138118
139119 artifact sourcesJar
140120 artifact javadocJar
141121 }
142-
143122 }
144123}
145124
146125bintray {
147126 user = project. hasProperty(' bintrayUser' ) ? project. property(' bintrayUser' ) : System . getenv(' BINTRAY_USER' )
148127 key = project. hasProperty(' bintrayApiKey' ) ? project. property(' bintrayApiKey' ) : System . getenv(' BINTRAY_API_KEY' )
149128
150- publications = [' MyPublication ' ]
151- // configurations = ['archives']
129+ // publications = ['mavenJava ']
130+ configurations = [' archives' ]
152131
153132 dryRun = false // Whether to run this as dry-run, without deploying
154133 publish = true // If version should be auto published after an upload
@@ -164,4 +143,4 @@ bintray {
164143 released = new Date ()
165144 }
166145 }
167- }
146+ }
0 commit comments