Skip to content

Commit 72b023d

Browse files
committed
Publish SNAPSHOT builds to OJO on commit.
This publishes a new build to: https://oss.jfrog.org/artifactory/oss-snapshot-local/com/android/volley/volley/ every time a new commit is pushed to the master branch. Other branches and pull requests are ignored. Additional cleanup: -Remove obsolete Maven configuration files. -Remove direct-to-bintray publishing config, as in the future we will be promoting SNAPSHOTS rather than publishing directly. -Update build metadata to reflect move from AOSP to GitHub. See google#11
1 parent a444f81 commit 72b023d

File tree

7 files changed

+79
-306
lines changed

7 files changed

+79
-306
lines changed

.travis.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,12 @@ cache:
2525
- $HOME/.gradle/caches/
2626
- $HOME/.gradle/wrapper/
2727
- $HOME/.android/build-cache
28+
29+
env:
30+
global:
31+
- secure: pQb1CpD3heCma1831L4rnZGHgn6acFoBMlRrMBWc7nXXM5WwQ4cMSwZ49TVGMMVobA76vKm6dZj4n5ut5/i9amS9Ohlxbpjw5jVp1dqgev6PMupimkYfeTjTVdfGDlian8J7g4kQcVBXghq2WR+rUVh+VlhenE7r7lzEAscWRAKmo0Dzv1E3idI9ik8gkcAdE0ICJmYoq7vxxBhI3XzofHdq0bkzaCzU4P4OSX5HFN8Z4EloTeEeKZj0f02NwS+rrYzhNDs+8619W1gffAjJ9+C0im7iU8axoxMDE9e5dO4PEO03ol/U7F1NNmwFJ+Q78f9qmNw8u4EYnfzUn7nkH+GvYvX9jGlJoNqXPet0eKsJVIShx5eZjpgtUO0ICZKxYuqtKVfj55MPicMLhKFr1VvUTI4noomQVraUAtnI/H0Ia28795WLry4lbMRuYAwCpsmKJKKNQ5sj3dkokpMmn7SH64zNIxKHpAEkrg3UUWh0LUvk7ePn45RAPXS5M0EX0z6LvQEi5dRVfSc2b69CX9vXyqoG/29xwdaYV+BSZjc1zDFN9BXAwDWhfs86ONSmovi5SXoKd/7FWoEAQVX/ZAW93HuScq5pMq7RYbjN4IThqhCC/K6TgwC2PRtPaIK/Rucc9Gvs8Gh5nphabSDzIPoGUEXXPG+lsG10G9qxGKU=
32+
- secure: NhFfhYu6WNuFNpJt3GoGMYpWdYv3xfS7FExeEidvIol+GbuglCv/FOVYVFdHnE52+lvmLz1UTdOSvMhbQe6mhL+ZJQYCILH5i3ion92MlH6YWaJisafzBvSrhUjMFzo0LEJwJ9k3FsAARc0QR+GIsyd0un4MrybeZwFX0VzLElxRl5bEXnxXqYjdw7Mzs3fyROnxees1waz6Ksu3v8NPk45ooy633DGl3txVI/05rT89WwtUnvz0ieAAMiOUTOWs6lAkb45hAzdBng+U5YNL/BiK1y+o4PFYCF7nNJ2A2s6qG/hZYiTa3tLR2tgb5sDHQl4KZ2YEVdEGCZ52nY5vNXAWWZIp1thJYOmaVXFHn/YG8+Qpr2+maUHjzlttIOWl41JSN54emyrK5ZbbAKzMOYKZeRcDP41oP9YlqnsPSL2GBbxqG2GAzv5btHXQPTJVpbqwZUOjYM6jetzRifIWisreN8qQ3cWXLe5l/ra0E6TUbOBH2fC0tZwYe6tkmSGnskA81KwmX7qqKdeJvlAYbGS6MylOSlMmrYqmpKCpofatT1/ZYrnZZSPNRZGQt0L+D1LaYMYlEkSqboxb/OCBL+oD6ncsJWT2YYTQSPdqfmUHF8pNi3hCJe04pqVCbaoEYyMrPlZ+PeZnYDuNSC+Moyu+z7Cqikqg2flzH+F0Az0=
33+
34+
# Publish a SNAPSHOT build for all commits to master.
35+
after_success:
36+
- ./publish-snapshot-on-commit.sh

bintray-info-template.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"package": {
3+
"user_org": "android",
4+
"repo": "android-utils",
5+
"group": "com.android.volley",
6+
"name": "com.android.volley.volley",
7+
"desc": "Volley Android library",
8+
"licenses": ["Apache-2.0"],
9+
"website_url": "https://github.com/google/volley",
10+
"issue_tracker_url": "https://github.com/google/volley/issues",
11+
"vcs_url": "https://github.com/google/volley.git",
12+
"labels": ["android", "volley", "network"],
13+
"public_download_numbers": true
14+
},
15+
"version": {
16+
"name": "$VERSION$",
17+
"desc": "Volley Android library version $VERSION$",
18+
"gpgSign": false
19+
},
20+
"publish": true
21+
}

bintray.gradle

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ buildscript {
33
jcenter()
44
}
55
dependencies {
6-
classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:1.2"
6+
classpath "org.jfrog.buildinfo:build-info-extractor-gradle:4.0.0"
77
}
88
}
99

@@ -12,13 +12,12 @@ buildscript {
1212
// is currently not capable of loading plugins by Id if the dependency is anywhere else than
1313
// in the main project build.gradle. This file is "imported" into the project's build.gradle
1414
// through a "apply from:".
15-
apply plugin: com.jfrog.bintray.gradle.BintrayPlugin
15+
apply plugin: org.jfrog.gradle.plugin.artifactory.ArtifactoryPlugin
1616
apply plugin: 'maven-publish'
1717

18-
project.ext.group = 'com.android.volley'
19-
project.ext.archivesBaseName = 'volley'
20-
project.ext.version = '1.0.0'
21-
project.ext.pomDesc = 'Volley Android library'
18+
def bintrayInfoFilePath = "$buildDir/outputs/bintray-descriptor.bintray-info.json"
19+
20+
project.ext.version = '1.0.1-SNAPSHOT'
2221

2322
task sourcesJar(type: Jar) {
2423
classifier = 'sources'
@@ -35,6 +34,16 @@ task javadocJar(type: Jar, dependsOn: javadoc) {
3534
from javadoc.destinationDir
3635
}
3736

37+
task bintrayInfoFile {
38+
outputs.file(bintrayInfoFilePath)
39+
doLast {
40+
println 'Creating bintray-info.json'
41+
String fileContent = new File("$rootDir/bintray-info-template.json").getText('UTF-8')
42+
fileContent = fileContent.replace('$VERSION$', project.ext.version)
43+
((new File(bintrayInfoFilePath))).write(fileContent)
44+
}
45+
}
46+
3847
artifacts {
3948
archives javadocJar
4049
archives sourcesJar
@@ -43,45 +52,36 @@ artifacts {
4352
publishing {
4453
publications {
4554
library(MavenPublication) {
46-
groupId project.ext.group
47-
artifactId project.ext.archivesBaseName
55+
groupId 'com.android.volley'
56+
artifactId 'volley'
4857
version project.ext.version
4958

5059
// Release AAR, Sources, and JavaDoc
5160
artifact "$buildDir/outputs/aar/volley-release.aar"
5261
artifact sourcesJar
5362
artifact javadocJar
63+
artifact(bintrayInfoFilePath) {
64+
builtBy bintrayInfoFile
65+
extension "bintray-info.json"
66+
}
5467
}
5568
}
5669
}
5770

58-
bintray {
59-
user = System.env.BINTRAY_USER
60-
key = System.env.BINTRAY_USER_KEY
61-
62-
publications = [ 'library' ]
63-
64-
publish = project.hasProperty("release")
65-
pkg {
66-
userOrg = 'android'
67-
repo = 'android-utils'
68-
group = project.ext.group
69-
name = project.ext.group + '.' + project.ext.archivesBaseName
70-
desc = project.ext.pomDesc
71-
licenses = [ 'Apache-2.0' ]
72-
websiteUrl = 'https://tools.android.com'
73-
issueTrackerUrl = 'https://code.google.com/p/android/'
74-
vcsUrl = 'https://android.googlesource.com/platform/frameworks/volley.git'
75-
labels = ['android', 'volley', 'network']
76-
publicDownloadNumbers = true
77-
78-
version {
79-
name = project.ext.version
80-
desc = project.ext.pomDesc + ' version ' + project.ext.version
81-
gpg {
82-
sign = true
83-
passphrase = System.env.GPG_PASSPHRASE
84-
}
71+
artifactory {
72+
contextUrl = "https://oss.jfrog.org"
73+
publish {
74+
repository {
75+
repoKey = 'oss-snapshot-local'
76+
username = System.env.CI_DEPLOY_USERNAME
77+
password = System.env.CI_DEPLOY_PASSWORD
78+
}
79+
defaults {
80+
publications('library')
81+
publishArtifacts = true
8582
}
8683
}
87-
}
84+
resolve {
85+
repoKey = 'jcenter'
86+
}
87+
}

build.xml

Lines changed: 0 additions & 92 deletions
This file was deleted.

custom_rules.xml

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)