|
1 | 1 |
|
2 | | -buildscript { |
3 | | - repositories { |
4 | | - mavenCentral() |
5 | | - } |
6 | | - dependencies { |
7 | | - classpath 'com.android.tools.build:gradle:2.3.+' |
8 | | - classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1' |
9 | | - classpath 'com.diffplug.spotless:spotless-plugin-gradle:6.25.0' |
10 | | - } |
11 | | -} |
12 | 2 |
|
13 | 3 | plugins { |
| 4 | + id 'java' |
14 | 5 | id 'com.vanniktech.maven.publish' version '0.34.0' |
15 | 6 | id 'com.diffplug.spotless' version '6.25.0' |
16 | 7 | } |
17 | 8 |
|
18 | | -apply plugin: 'java' |
19 | | -apply plugin: 'maven-publish' |
20 | | -apply plugin: 'signing' |
21 | | - |
22 | 9 | group = 'com.dropbox.sign' |
23 | | -archivesBaseName = 'dropbox-sign' |
24 | 10 | version = '1.13.0' |
25 | | -sourceCompatibility = JavaVersion.VERSION_1_8 |
26 | | -targetCompatibility = JavaVersion.VERSION_1_8 |
| 11 | + |
| 12 | +base { |
| 13 | + archivesName.set('dropbox-sign') |
| 14 | +} |
| 15 | + |
| 16 | +java { |
| 17 | + sourceCompatibility = JavaVersion.VERSION_1_8 |
| 18 | + targetCompatibility = JavaVersion.VERSION_1_8 |
| 19 | +} |
27 | 20 |
|
28 | 21 | repositories { |
29 | 22 | mavenCentral() |
30 | 23 | } |
31 | 24 |
|
32 | | -tasks.withType(JavaCompile) { |
| 25 | +tasks.withType(JavaCompile).configureEach { |
33 | 26 | options.encoding = 'UTF-8' |
34 | 27 | } |
35 | 28 |
|
36 | | -if (JavaVersion.current().isJava8Compatible()) { |
37 | | - tasks.withType(Javadoc) { |
38 | | - // disable the crazy super-strict doclint tool in Java 8 |
39 | | - //noinspection SpellCheckingInspection |
| 29 | +tasks.withType(Javadoc).configureEach { |
40 | 30 | options.addStringOption('Xdoclint:none', '-quiet') |
41 | | - } |
42 | 31 | } |
43 | 32 |
|
44 | 33 | task javadocJar(type: Jar) { |
@@ -68,53 +57,6 @@ artifacts { |
68 | 57 | archives javadocJar, sourcesJar, fatJar |
69 | 58 | } |
70 | 59 |
|
71 | | -publishing { |
72 | | - publications { |
73 | | - mavenJava(MavenPublication) { |
74 | | - pom { |
75 | | - name = 'Dropbox Sign' |
76 | | - packaging = 'jar' |
77 | | - // optionally artifactId can be defined here |
78 | | - artifactId = 'dropbox-sign' |
79 | | - description = 'Use the Dropbox SIgn Java SDK to connect your Java app to Dropbox Sign\'s service in microseconds!' |
80 | | - url = 'https://www.hellosign.com/' |
81 | | - |
82 | | - scm { |
83 | | - connection = 'scm:git:git://github.com/hellosign/dropbox-sign-java.git' |
84 | | - developerConnection = 'scm:git:git@github.com:hellosign/dropbox-sign-java.git' |
85 | | - url = 'https://github.com/hellosign/dropbox-sign-java' |
86 | | - } |
87 | | - |
88 | | - licenses { |
89 | | - license { |
90 | | - name = 'MIT License' |
91 | | - url = 'http://www.opensource.org/licenses/mit-license.php' |
92 | | - } |
93 | | - } |
94 | | - |
95 | | - developers { |
96 | | - developer { |
97 | | - name = 'Dropbox Sign API Team' |
98 | | - email = 'apisupport@hellosign.com' |
99 | | - url = 'https://www.hellosign.com' |
100 | | - } |
101 | | - } |
102 | | - } |
103 | | - } |
104 | | - } |
105 | | - repositories { |
106 | | - maven { |
107 | | - def releasesRepoUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2/" |
108 | | - def snapshotsRepoUrl = "https://oss.sonatype.org/content/repositories/snapshots/" |
109 | | - url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl |
110 | | - credentials { |
111 | | - username findProperty('ossrhUsername') |
112 | | - password findProperty('ossrhPassword') |
113 | | - } |
114 | | - } |
115 | | - } |
116 | | -} |
117 | | - |
118 | 60 | ext { |
119 | 61 | swagger_annotations_version = "1.6.5" |
120 | 62 | jackson_version = "2.17.1" |
|
0 commit comments