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
1819repositories  {
@@ -23,21 +24,18 @@ repositories {
2324}
2425
2526dependencies  {
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
4341def  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
5971publishing  {
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} " 
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- 
200200compileJava  {
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- 
270213artifacts  {
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- 
281219def  customizePom (pom ) {
282220    pom. withXml {
283221        def  root =  asNode()
0 commit comments