-
Notifications
You must be signed in to change notification settings - Fork 754
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Publish SNAPSHOT builds to OSSRH instead of OJO. (#397)
Example build (generated locally): https://oss.sonatype.org/#nexus-search;gav~com.android.volley~volley~~~ See #394
- Loading branch information
Showing
3 changed files
with
19 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,3 @@ | ||
buildscript { | ||
repositories { | ||
jcenter() | ||
} | ||
dependencies { | ||
classpath "org.jfrog.buildinfo:build-info-extractor-gradle:4.8.1" | ||
} | ||
} | ||
|
||
// apply the plugin with its class name rather than its Id to work around gradle limitation of | ||
// not being able to find the plugin by Id despite the dependencies being added right above. Gradle | ||
// is currently not capable of loading plugins by Id if the dependency is anywhere else than | ||
// in the main project build.gradle. This file is "imported" into the project's build.gradle | ||
// through a "apply from:". | ||
apply plugin: org.jfrog.gradle.plugin.artifactory.ArtifactoryPlugin | ||
apply plugin: 'maven-publish' | ||
|
||
task sourcesJar(type: Jar) { | ||
|
@@ -42,13 +27,21 @@ publishing { | |
artifactId 'volley' | ||
version project.version | ||
pom { | ||
name = 'Volley' | ||
description = 'An HTTP library that makes networking for Android apps easier and, most importantly, faster.' | ||
url = 'https://github.com/google/volley' | ||
packaging 'aar' | ||
licenses { | ||
license { | ||
name = "The Apache License, Version 2.0" | ||
url = "https://www.apache.org/licenses/LICENSE-2.0.txt" | ||
} | ||
} | ||
scm { | ||
connection = 'scm:git:git:https://github.com/google/volley.git' | ||
developerConnection = 'scm:git:ssh:https://[email protected]/google/volley.git' | ||
url = 'https://github.com/google/volley' | ||
} | ||
} | ||
|
||
// Release AAR, Sources, and JavaDoc | ||
|
@@ -57,22 +50,14 @@ publishing { | |
artifact javadocJar | ||
} | ||
} | ||
} | ||
|
||
artifactory { | ||
contextUrl = "https://oss.jfrog.org" | ||
publish { | ||
repository { | ||
repoKey = 'oss-snapshot-local' | ||
username = System.env.CI_DEPLOY_USERNAME | ||
password = System.env.CI_DEPLOY_PASSWORD | ||
} | ||
defaults { | ||
publications('library') | ||
publishArtifacts = true | ||
repositories { | ||
maven { | ||
url = "https://oss.sonatype.org/content/repositories/snapshots/" | ||
credentials { | ||
username = System.env.OSSRH_DEPLOY_USERNAME | ||
password = System.env.OSSRH_DEPLOY_PASSWORD | ||
} | ||
} | ||
} | ||
resolve { | ||
repoKey = 'jcenter' | ||
} | ||
} |