Skip to content

Commit 8493cc3

Browse files
committed
- names repostories and moves urls to build file for clarity
1 parent 75c2281 commit 8493cc3

File tree

2 files changed

+20
-28
lines changed

2 files changed

+20
-28
lines changed

build.gradle

Lines changed: 20 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ plugins {
1313
id 'eclipse'
1414
id 'maven-publish'
1515
id 'signing'
16-
id 'jacoco'
1716
}
1817

1918
// In this section you declare where to find the dependencies of your project
@@ -72,15 +71,10 @@ publishing {
7271
publications {
7372

7473
maven(MavenPublication) {
75-
7674
groupId 'com.microsoft.graph'
77-
7875
artifactId 'microsoft-graph-core'
79-
8076
version "${mavenMajorVersion}.${mavenMinorVersion}.${mavenPatchVersion}${mavenArtifactSuffix}"
81-
8277
from components.java
83-
8478
artifact sourceJar
8579
artifact javadocJar
8680
pom.withXml {
@@ -140,55 +134,57 @@ publishing {
140134
}
141135
repositories {
142136
maven {
143-
url = project.property('mavenCentralSnapshotUrl')
137+
url = 'https://oss.sonatype.org/content/repositories/snapshots'
138+
name = 'sonatypeSnapshot'
144139

145140
credentials {
146141
if (project.rootProject.file('local.properties').exists()) {
147-
148142
Properties properties = new Properties()
149-
150143
properties.load(project.rootProject.file('local.properties').newDataInputStream())
151-
152144
username = properties.getProperty('sonatypeUsername')
153-
154145
password = properties.getProperty('sonatypePassword')
155-
156146
}
157147
}
158148
}
159149

160150
maven {
161-
url = project.property('mavenCentralReleaseUrl')
151+
url = 'https://oss.sonatype.org/service/local/staging/deploy/maven2'
152+
name = 'sonatype'
162153

163154
credentials {
164155
if (project.rootProject.file('local.properties').exists()) {
165-
166156
Properties properties = new Properties()
167-
168157
properties.load(project.rootProject.file('local.properties').newDataInputStream())
169-
170158
username = properties.getProperty('sonatypeUsername')
171-
172159
password = properties.getProperty('sonatypePassword')
173-
174160
}
175161
}
176162
}
177163

178164
maven {
179-
url = project.property('mavenBintraySnapshotUrl')
165+
url = 'http://oss.jfrog.org/artifactory/oss-snapshot-local'
166+
name = 'jfrogSnapshot'
180167

181168
credentials {
182169
if (project.rootProject.file('local.properties').exists()) {
183-
184170
Properties properties = new Properties()
185-
186171
properties.load(project.rootProject.file('local.properties').newDataInputStream())
187-
188172
username = (properties.containsKey('bintray.user')) ? properties.getProperty('bintray.user').toLowerCase() : "BINTRAY_USERNAME"
189-
190173
password = properties.getProperty('bintray.apikey')
174+
}
175+
}
176+
}
191177

178+
maven {
179+
url = 'https://oss.jfrog.org/artifactory/libs-release'
180+
name = 'jfrog'
181+
182+
credentials {
183+
if (project.rootProject.file('local.properties').exists()) {
184+
Properties properties = new Properties()
185+
properties.load(project.rootProject.file('local.properties').newDataInputStream())
186+
username = (properties.containsKey('bintray.user')) ? properties.getProperty('bintray.user').toLowerCase() : "BINTRAY_USERNAME"
187+
password = properties.getProperty('bintray.apikey')
192188
}
193189
}
194190
}
@@ -276,7 +272,7 @@ model {
276272
tasks.publishMavenCentralReleasePublicationToMavenLocal {
277273
dependsOn project.tasks.signArchives
278274
}
279-
tasks.publishMavenCentralReleasePublicationToMaven2Repository {
275+
tasks.publishMavenCentralReleasePublicationToSonatypeRepository {
280276
dependsOn project.tasks.signArchives
281277
}
282278
}

gradle.properties

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@
2121
## linux requires 10G, OSX requires 11G
2222
org.gradle.jvmargs=-XX:MaxPermSize=512m -Xmx2g
2323

24-
mavenRepoUrl = https://api.bintray.com/content/microsoftgraph/Maven/microsoft-graph-core
25-
mavenBintraySnapshotUrl = http://oss.jfrog.org/artifactory/oss-snapshot-local
2624
mavenGroupId = com.microsoft.graph
2725
mavenArtifactId = microsoft-graph-core
2826
mavenMajorVersion = 1
@@ -40,7 +38,5 @@ Username="USERNAME"
4038
Password="PASSWORD"
4139

4240
#enable mavenCentralPublishingEnabled to publish to maven central
43-
mavenCentralSnapshotUrl=https://oss.sonatype.org/content/repositories/snapshots
44-
mavenCentralReleaseUrl=https://oss.sonatype.org/service/local/staging/deploy/maven2
4541
mavenCentralSnapshotArtifactSuffix = -SNAPSHOT
4642
mavenCentralPublishingEnabled=false

0 commit comments

Comments
 (0)