@@ -101,6 +101,7 @@ artifacts {
101101 archives sourcesJar, javadocJar
102102}
103103
104+ // task to send coverage data to Codacy
104105task sendCoverageToCodacy (type : JavaExec , dependsOn : jacocoTestReport) {
105106 main = " com.codacy.CodacyCoverageReporter"
106107 classpath = configurations. codacy
@@ -115,7 +116,17 @@ task sendCoverageToCodacy(type: JavaExec, dependsOn: jacocoTestReport) {
115116
116117publishing {
117118 publications {
119+
118120 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+
119130 if (plugins. hasPlugin(' war' )) {
120131 from components. web
121132 } else {
@@ -129,38 +140,28 @@ publishing {
129140 artifact javadocJar
130141 }
131142
132- all {
133- // we have to change scope from runtime to compile. especially for Gson-lib.
134- pom. withXml {
135- asNode(). dependencies. ' *' . findAll() {
136- it. scope. text() == ' runtime' && project. configurations. compile. allDependencies. find { dep ->
137- dep. name == it. artifactId. text()
138- }
139- }. each { it. scope* . value = ' compile' }
140- }
141- }
142143 }
144+ }
143145
144- bintray {
145- user = project. hasProperty(' bintrayUser' ) ? project. property(' bintrayUser' ) : System . getenv(' BINTRAY_USER' )
146- key = project. hasProperty(' bintrayApiKey' ) ? project. property(' bintrayApiKey' ) : System . getenv(' BINTRAY_API_KEY' )
147-
148- publications = [' MyPublication' ]
149- // configurations = ['archives']
150-
151- dryRun = false // Whether to run this as dry-run, without deploying
152- publish = true // If version should be auto published after an upload
153-
154- pkg {
155- repo = ' maven'
156- userOrg = ' sybit-education'
157- name = ' airtable.java'
158- licenses = [' MIT License' ]
159- vcsUrl = ' https://github.com/Sybit-Education/airtable.java.git'
160- version {
161- name = getVersionName()
162- released = new Date ()
163- }
146+ bintray {
147+ user = project. hasProperty(' bintrayUser' ) ? project. property(' bintrayUser' ) : System . getenv(' BINTRAY_USER' )
148+ key = project. hasProperty(' bintrayApiKey' ) ? project. property(' bintrayApiKey' ) : System . getenv(' BINTRAY_API_KEY' )
149+
150+ publications = [' MyPublication' ]
151+ // configurations = ['archives']
152+
153+ dryRun = false // Whether to run this as dry-run, without deploying
154+ publish = true // If version should be auto published after an upload
155+
156+ pkg {
157+ repo = ' maven'
158+ userOrg = ' sybit-education'
159+ name = ' airtable.java'
160+ licenses = [' MIT License' ]
161+ vcsUrl = ' https://github.com/Sybit-Education/airtable.java.git'
162+ version {
163+ name = getVersionName()
164+ released = new Date ()
164165 }
165166 }
166167}
0 commit comments