Skip to content

Commit 08df2f6

Browse files
authored
Revert "Publishes to Maven central."
1 parent 410e571 commit 08df2f6

File tree

2 files changed

+4
-115
lines changed

2 files changed

+4
-115
lines changed

build.gradle

Lines changed: 4 additions & 107 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,12 @@ apply plugin: 'java'
1212
apply plugin: 'eclipse'
1313
apply plugin: 'maven'
1414
apply plugin: 'maven-publish'
15-
apply plugin: 'signing'
1615

1716
// In this section you declare where to find the dependencies of your project
1817
repositories {
1918
// Use jcenter for resolving your dependencies.
2019
// You can declare any Maven/Ivy/file repository here.
2120
jcenter()
22-
mavenCentral()
2321
}
2422

2523
dependencies {
@@ -50,7 +48,8 @@ def pomConfig = {
5048
publishing {
5149

5250
publications {
53-
maven(MavenPublication) {
51+
52+
maven(MavenPublication) {
5453

5554
groupId 'com.microsoft.graph'
5655

@@ -69,51 +68,9 @@ publishing {
6968
}
7069

7170
}
72-
73-
mavenJava(MavenPublication) {
74-
customizePom(pom)
75-
groupId 'com.microsoft.graph'
76-
artifactId 'microsoft-graph'
77-
version "${mavenMajorVersion}.${mavenMinorVersion}.${mavenPatchVersion}${mavenArtifactSuffix}"
78-
from components.java
79-
pom.withXml {
80-
def pomFile = file("${project.buildDir}/generated-pom.xml")
81-
writeTo(pomFile)
82-
def pomAscFile = signing.sign(pomFile).signatureFiles[0]
83-
artifact(pomAscFile) {
84-
classifier = null
85-
extension = 'pom.asc'
86-
}
87-
}
88-
artifact(sourceJar) {
89-
classifier = 'sources'
90-
}
91-
artifact(javadocJar) {
92-
classifier = 'javadoc'
93-
}
94-
project.tasks.signArchives.signatureFiles.each {
95-
artifact(it) {
96-
def matcher = it.file =~ /-(sources|javadoc)\.jar\.asc$/
97-
if(matcher.find()){
98-
classifier = matcher.group(1)
99-
}
100-
else{
101-
classifier = null
102-
}
103-
extension = 'jar.asc'
104-
}
105-
}
106-
}
107-
}
108-
repositories {
109-
maven {
110-
url "https://oss.sonatype.org/content/repositories/snapshots"
111-
credentials {
112-
username = project.property('sonatypeUsername')
113-
password = project.property('sonatypePassword')
114-
}
115-
}
71+
11672
}
73+
11774
}
11875

11976
task sourceJar(type: Jar) {
@@ -190,66 +147,6 @@ task javadocJar(type: Jar, dependsOn: javadoc) {
190147
}
191148

192149
artifacts {
193-
archives jar
194150
archives sourceJar
195151
archives javadocJar
196152
}
197-
198-
signing {
199-
sign configurations.archives
200-
}
201-
202-
def customizePom(pom) {
203-
pom.withXml {
204-
def root = asNode()
205-
206-
root.dependencies.removeAll { dep ->
207-
dep.scope == "test"
208-
}
209-
210-
root.children().last() + {
211-
resolveStrategy = Closure.DELEGATE_FIRST
212-
213-
description 'Microsoft Graph SDK'
214-
name 'Microsoft Graph Java SDK'
215-
url 'https://github.com/microsoftgraph/msgraph-sdk-java'
216-
organization {
217-
name 'Microsoft'
218-
url 'https://github.com/microsoftgraph/msgraph-sdk-java'
219-
}
220-
issueManagement {
221-
system 'GitHub'
222-
url 'https://github.com/microsoftgraph/msgraph-sdk-java/issues'
223-
}
224-
licenses {
225-
license {
226-
name "MIT License"
227-
url "http://opensource.org/licenses/MIT"
228-
distribution "repo"
229-
}
230-
}
231-
scm {
232-
url 'https://github.com/microsoftgraph/msgraph-sdk-java'
233-
connection 'scm:git:git://github.com/microsoftgraph/msgraph-sdk-java.git'
234-
developerConnection 'scm:git:ssh://[email protected]:microsoftgraph/msgraph-sdk-java.git'
235-
}
236-
developers {
237-
developer {
238-
name 'Microsoft'
239-
}
240-
}
241-
}
242-
}
243-
}
244-
245-
model {
246-
tasks.generatePomFileForMavenJavaPublication {
247-
destination = file("$buildDir/generated-pom.xml")
248-
}
249-
tasks.publishMavenJavaPublicationToMavenLocal {
250-
dependsOn project.tasks.signArchives
251-
}
252-
tasks.publishMavenJavaPublicationToMavenRepository {
253-
dependsOn project.tasks.signArchives
254-
}
255-
}

gradle.properties

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,3 @@ nightliesUrl = http://dl.bintray.com/MicrosoftGraph/Maven
3737
ClientId="CLIENT_ID"
3838
Username="USERNAME"
3939
Password="PASSWORD"
40-
41-
#enter below credentials to publish to maven central
42-
signing.keyId="keyId"
43-
signing.secretKeyRingFile="fileLocation"
44-
signing.password="passphrase"
45-
sonatypeUsername="USERNAME"
46-
sonatypePassword="PASSWORD"
47-

0 commit comments

Comments
 (0)