@@ -7,37 +7,37 @@ group = '{{groupId}}'
77version = '{ {artifactVersion} }'
88{ {/useCustomTemplateCode} }
99
10+ { {^useCustomTemplateCode} }
1011buildscript {
1112 repositories {
1213 mavenCentral()
1314 }
1415 dependencies {
1516 classpath ' com.android.tools.build:gradle:2.3.+'
1617 classpath ' com.github.dcendents:android-maven-gradle-plugin:2.1'
17- {{^useCustomTemplateCode} }
1818 classpath ' com.diffplug.spotless:spotless-plugin-gradle:6.3.0'
19- { {/useCustomTemplateCode} }
20- { {#useCustomTemplateCode} }
21- classpath 'com.diffplug.spotless:spotless-plugin-gradle:6.25.0'
22- { {/useCustomTemplateCode} }
2319 }
2420}
21+ { {/useCustomTemplateCode} }
2522
2623{ {#useCustomTemplateCode} }
2724plugins {
25+ id ' java'
2826 id ' com.vanniktech.maven.publish' version ' 0.34.0'
2927 id ' com.diffplug.spotless' version ' 6.25.0'
3028}
3129
32- apply plugin: 'java'
33- apply plugin: 'maven-publish'
34- apply plugin: 'signing'
35-
3630group = '{ {groupId} }'
37- archivesBaseName = '{ {artifactId} }'
3831version = '{ {artifactVersion} }'
39- sourceCompatibility = JavaVersion.VERSION_1_8
40- targetCompatibility = JavaVersion.VERSION_1_8
32+
33+ base {
34+ archivesName.set(' {{artifactId}}' )
35+ }
36+
37+ java {
38+ sourceCompatibility = JavaVersion.VERSION_1_8
39+ targetCompatibility = JavaVersion.VERSION_1_8
40+ }
4141
4242{ {/useCustomTemplateCode} }
4343repositories {
@@ -123,16 +123,12 @@ if(hasProperty('target') && target == 'android') {
123123}
124124{ {/useCustomTemplateCode} }
125125{ {#useCustomTemplateCode} }
126- tasks.withType(JavaCompile) {
126+ tasks.withType(JavaCompile).configureEach {
127127 options.encoding = ' UTF-8'
128128}
129129
130- if (JavaVersion.current().isJava8Compatible()) {
131- tasks.withType(Javadoc) {
132- // disable the crazy super-strict doclint tool in Java 8
133- //noinspection SpellCheckingInspection
130+ tasks.withType(Javadoc).configureEach {
134131 options.addStringOption(' Xdoclint:none' , ' -quiet' )
135- }
136132}
137133
138134task javadocJar(type: Jar) {
@@ -161,53 +157,6 @@ processResources {
161157artifacts {
162158 archives javadocJar, sourcesJar, fatJar
163159}
164-
165- publishing {
166- publications {
167- mavenJava(MavenPublication) {
168- pom {
169- name = ' Dropbox Sign'
170- packaging = ' jar'
171- // optionally artifactId can be defined here
172- artifactId = ' {{artifactId}}'
173- description = ' Use the Dropbox SIgn Java SDK to connect your Java app to Dropbox Sign\' s service in microseconds!'
174- url = ' https://www.hellosign.com/'
175-
176- scm {
177- connection = ' {{scmConnection}}'
178- developerConnection = ' {{scmDeveloperConnection}}'
179- url = ' {{scmUrl}}'
180- }
181-
182- licenses {
183- license {
184- name = ' {{licenseName}}'
185- url = ' http://www.opensource.org/licenses/mit-license.php'
186- }
187- }
188-
189- developers {
190- developer {
191- name = ' {{developerName}}'
192- email = ' {{developerEmail}}'
193- url = ' https://www.hellosign.com'
194- }
195- }
196- }
197- }
198- }
199- repositories {
200- maven {
201- def releasesRepoUrl = " https://oss.sonatype.org/service/local/staging/deploy/maven2/"
202- def snapshotsRepoUrl = " https://oss.sonatype.org/content/repositories/snapshots/"
203- url = version.endsWith(' SNAPSHOT' ) ? snapshotsRepoUrl : releasesRepoUrl
204- credentials {
205- username findProperty(' ossrhUsername' )
206- password findProperty(' ossrhPassword' )
207- }
208- }
209- }
210- }
211160{ {/useCustomTemplateCode} }
212161
213162ext {
0 commit comments