Skip to content

Commit cd9c28f

Browse files
committed
- upgrades gradle from 4.5 to 6.6
1 parent 93113bd commit cd9c28f

File tree

6 files changed

+93
-146
lines changed

6 files changed

+93
-146
lines changed

build.gradle

Lines changed: 33 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
/*
2-
* This build file was generated by the Gradle 'init' task.
2+
* This file was generated by the Gradle 'init' task.
33
*
44
* This generated file contains a sample Java Library project to get you started.
55
* For more details take a look at the Java Libraries chapter in the Gradle
6-
* user guide available at https://docs.gradle.org/4.5/userguide/java_library_plugin.html
6+
* User Manual available at https://docs.gradle.org/6.6/userguide/java_library_plugin.html
77
*/
88

9-
// Apply the java-library plugin to add support for Java Library
10-
apply plugin: 'java-library'
11-
apply plugin: 'java'
12-
apply plugin: 'eclipse'
13-
apply plugin: 'maven'
14-
apply plugin: 'maven-publish'
15-
apply plugin: 'signing'
9+
plugins {
10+
// Apply the java-library plugin to add support for Java Library
11+
id 'java-library'
12+
id 'java'
13+
id 'eclipse'
14+
id 'maven-publish'
15+
id 'signing'
16+
}
1617

1718
// In this section you declare where to find the dependencies of your project
1819
repositories {
@@ -23,21 +24,18 @@ repositories {
2324
}
2425

2526
dependencies {
26-
// This dependency is exported to consumers, that is to say found on their compile classpath.
27-
api 'org.apache.commons:commons-math3:3.6.1'
28-
2927
// This dependency is used internally, and not exposed to consumers on their own compile classpath.
3028
implementation 'com.google.guava:guava:20.0'
3129

3230
// Use JUnit test framework
3331
testImplementation 'junit:junit:4.13'
3432

35-
compile 'com.google.code.gson:gson:2.8.6'
33+
implementation 'com.google.code.gson:gson:2.8.6'
3634

37-
compile 'com.sun.jersey:jersey-server:1.19.4'
35+
implementation 'com.sun.jersey:jersey-server:1.19.4'
3836

3937
// Core Http library
40-
compile('com.microsoft.graph:microsoft-graph-core:1.0.1')
38+
implementation 'com.microsoft.graph:microsoft-graph-core:1.0.1'
4139
}
4240

4341
def pomConfig = {
@@ -54,7 +52,21 @@ def pomConfig = {
5452
//Maven Central Snapshot: publishSnapshotPublicationToMavenRepository
5553
//Maven Central Release: publishMavenCentralReleasePublicationToMaven2Repository
5654
//Bintray Snapshot: publishSnapshotPublicationToMaven3Repository
57-
//Bintray Release: uploadArchives
55+
56+
task sourceJar(type: Jar) {
57+
from sourceSets.main.allJava
58+
archiveClassifier = 'sources'
59+
}
60+
61+
task javadocJar(type: Jar, dependsOn: javadoc) {
62+
from javadoc.destinationDir
63+
archiveClassifier = 'javadoc'
64+
}
65+
66+
signing {
67+
sign configurations.archives
68+
}
69+
tasks.withType(Sign)*.enabled = mavenCentralPublishingEnabled.toBoolean()
5870

5971
publishing {
6072

@@ -71,6 +83,7 @@ publishing {
7183
from components.java
7284

7385
artifact sourceJar
86+
artifact javadocJar
7487
pom.withXml {
7588
def root = asNode()
7689
root.appendNode('name', 'Microsoft Graph Beta SDK for Java')
@@ -91,12 +104,8 @@ publishing {
91104
def pomFile = file("${project.buildDir}/generated-pom.xml")
92105
writeTo(pomFile)
93106
}
94-
artifact(sourceJar) {
95-
classifier = 'sources'
96-
}
97-
artifact(javadocJar) {
98-
classifier = 'javadoc'
99-
}
107+
artifact sourceJar
108+
artifact javadocJar
100109
}
101110

102111
mavenCentralRelease(MavenPublication) {
@@ -114,12 +123,8 @@ publishing {
114123
extension = 'pom.asc'
115124
}
116125
}
117-
artifact(sourceJar) {
118-
classifier = 'sources'
119-
}
120-
artifact(javadocJar) {
121-
classifier = 'javadoc'
122-
}
126+
artifact sourceJar
127+
artifact javadocJar
123128
project.tasks.signArchives.signatureFiles.each {
124129
artifact(it) {
125130
def matcher = it.file =~ /-(sources|javadoc)\.jar\.asc$/
@@ -192,11 +197,6 @@ publishing {
192197

193198
}
194199

195-
task sourceJar(type: Jar) {
196-
classifier = 'sources'
197-
from sourceSets.main.allJava
198-
}
199-
200200
compileJava {
201201
sourceCompatibility = 1.8
202202
targetCompatibility = 1.8
@@ -210,74 +210,12 @@ def getVersionName() {
210210
return "${mavenMajorVersion}.${mavenMinorVersion}.${mavenPatchVersion}${mavenArtifactSuffix}"
211211
}
212212

213-
uploadArchives {
214-
215-
def bintrayUsername = ""
216-
217-
def bintrayApikey = ""
218-
219-
if (project.rootProject.file('local.properties').exists()) {
220-
221-
Properties properties = new Properties()
222-
223-
properties.load(project.rootProject.file('local.properties').newDataInputStream())
224-
225-
bintrayUsername = properties.getProperty('bintray.user')
226-
227-
bintrayApikey = properties.getProperty('bintray.apikey')
228-
229-
}
230-
231-
configuration = configurations.archives
232-
233-
repositories.mavenDeployer {
234-
235-
pom {
236-
237-
setGroupId project.mavenGroupId
238-
239-
setArtifactId project.mavenArtifactId
240-
241-
setVersion getVersionName()
242-
243-
}
244-
245-
repository (url: project.mavenRepoUrl) {
246-
247-
url = url + "/" + getVersionName()
248-
249-
authentication(
250-
251-
// put these values in local file ~/.gradle/gradle.properties
252-
253-
userName: project.hasProperty("bintrayUsername") ? project.bintrayUsername : bintrayUsername,
254-
255-
password: project.hasProperty("bintrayApikey") ? project.bintrayApikey : bintrayApikey
256-
257-
)
258-
259-
}
260-
261-
}
262-
263-
}
264-
265-
task javadocJar(type: Jar, dependsOn: javadoc) {
266-
classifier = 'javadoc'
267-
from javadoc.destinationDir
268-
}
269-
270213
artifacts {
271214
archives jar
272215
archives sourceJar
273216
archives javadocJar
274217
}
275218

276-
signing {
277-
sign configurations.archives
278-
}
279-
tasks.withType(Sign)*.enabled = mavenCentralPublishingEnabled.toBoolean()
280-
281219
def customizePom(pom) {
282220
pom.withXml {
283221
def root = asNode()

gradle/wrapper/gradle-wrapper.jar

4.76 KB
Binary file not shown.
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
#Thu Dec 07 16:02:17 AEDT 2017
21
distributionBase=GRADLE_USER_HOME
32
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.6-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-4.5.1-bin.zip

gradlew

Lines changed: 33 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gradlew.bat

Lines changed: 24 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)