@@ -3,7 +3,7 @@ buildscript {
3
3
jcenter()
4
4
}
5
5
dependencies {
6
- classpath " com .jfrog.bintray.gradle:gradle-bintray-plugin:1.2 "
6
+ classpath " org .jfrog.buildinfo:build-info-extractor-gradle:4.0.0 "
7
7
}
8
8
}
9
9
@@ -12,13 +12,12 @@ buildscript {
12
12
// is currently not capable of loading plugins by Id if the dependency is anywhere else than
13
13
// in the main project build.gradle. This file is "imported" into the project's build.gradle
14
14
// through a "apply from:".
15
- apply plugin : com .jfrog.bintray. gradle.BintrayPlugin
15
+ apply plugin : org .jfrog.gradle.plugin.artifactory.ArtifactoryPlugin
16
16
apply plugin : ' maven-publish'
17
17
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'
22
21
23
22
task sourcesJar (type : Jar ) {
24
23
classifier = ' sources'
@@ -35,6 +34,16 @@ task javadocJar(type: Jar, dependsOn: javadoc) {
35
34
from javadoc. destinationDir
36
35
}
37
36
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
+
38
47
artifacts {
39
48
archives javadocJar
40
49
archives sourcesJar
@@ -43,45 +52,36 @@ artifacts {
43
52
publishing {
44
53
publications {
45
54
library(MavenPublication ) {
46
- groupId project . ext . group
47
- artifactId project . ext . archivesBaseName
55
+ groupId ' com.android.volley '
56
+ artifactId ' volley '
48
57
version project. ext. version
49
58
50
59
// Release AAR, Sources, and JavaDoc
51
60
artifact " $buildDir /outputs/aar/volley-release.aar"
52
61
artifact sourcesJar
53
62
artifact javadocJar
63
+ artifact(bintrayInfoFilePath) {
64
+ builtBy bintrayInfoFile
65
+ extension " bintray-info.json"
66
+ }
54
67
}
55
68
}
56
69
}
57
70
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
85
82
}
86
83
}
87
- }
84
+ resolve {
85
+ repoKey = ' jcenter'
86
+ }
87
+ }
0 commit comments