Skip to content

Commit bfbfdc4

Browse files
committed
Bintray Publishing, 1.0.0, remove Storage
Bug: 28716920 Bug: 28718849 Change-Id: I2c1ba6f556c1232e6e570cc09187b9363fe3316f
1 parent 1a804cf commit bfbfdc4

File tree

11 files changed

+65
-70
lines changed

11 files changed

+65
-70
lines changed

build.gradle

Lines changed: 35 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,9 @@ buildscript {
88
dependencies {
99
classpath 'com.android.tools.build:gradle:1.5.0'
1010
classpath 'com.google.gms:google-services:3.0.0'
11-
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
1211

13-
// NOTE: Do not place your application dependencies here; they belong
14-
// in the individual module build.gradle files
12+
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
13+
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.2'
1514
}
1615
}
1716

@@ -32,7 +31,10 @@ allprojects { project ->
3231
// like the list of submodules or the version
3332
apply from: "$rootDir/common/constants.gradle"
3433

35-
if (project.ext.submodules.contains(project.name)) {
34+
def isLibrary = 'library'.equals(project.name)
35+
def isSubmodule = project.ext.submodules.contains(project.name)
36+
37+
if (isSubmodule) {
3638

3739
// So that we can resolve 'android' variable
3840
apply plugin: 'com.android.library'
@@ -122,4 +124,33 @@ allprojects { project ->
122124

123125
}
124126
}
127+
128+
// Bintray Configuration (applies to submodule and the monolith)
129+
if (isSubmodule || isLibrary) {
130+
apply plugin: 'com.jfrog.bintray'
131+
132+
def archivesBaseName = isLibrary ? 'firebase-ui' : "firebase-ui-${project.name}"
133+
group = project.ext.group
134+
version = project.ext.version
135+
136+
bintray {
137+
user = hasProperty('BINTRAY_USER') ? getProperty('BINTRAY_USER') : System.getenv('BINTRAY_USER')
138+
key = hasProperty('BINTRAY_KEY') ? getProperty('BINTRAY_KEY') : System.getenv('BINTRAY_KEY')
139+
140+
configurations = [ 'archives' ]
141+
142+
pkg {
143+
repo = 'firebase-ui'
144+
name = archivesBaseName
145+
userOrg = 'firebaseui'
146+
licenses = [ 'Apache-2.0' ]
147+
vcsUrl = 'https://github.com/firebase/FirebaseUI-Android.git'
148+
149+
version {
150+
name = version
151+
released = new Date()
152+
}
153+
}
154+
}
155+
}
125156
}

common/constants.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
project.ext.firebase_version = '9.0.0'
22

3-
project.ext.submodules = ['database', 'storage', 'auth']
3+
project.ext.submodules = ['database', 'auth']
44
project.ext.group = "com.firebaseui"
5-
project.ext.version = '1.0.0-beta1'
5+
project.ext.version = '1.0.0'
66
project.ext.pomdesc = 'Firebase UI Android'

library/PUBLISHING.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
In order to publish to your local maven repository, run the following command:
66

77
```
8-
./gradlew:library:prepareArtifacts :library:publishAllToMavenLocal
8+
./gradlew: library:prepareArtifacts :library:publishAllToMavenLocal
99
```
1010

1111
If you would like to specify a custom local maven repo location, run the following command, changing
@@ -18,4 +18,9 @@ the value of the `custom_local` property to your desired location. The default
1818

1919
# Publishing to jCenter
2020

21-
// TODO(samstern): determine publishing strategy
21+
This will publish all of the artfiacts (as drafts) to Bintray. You will need
22+
the environment variables `BINTRAY_USER` and `BINTRAY_KEY` defined appropriately.
23+
24+
```
25+
./gradlew: clean library:prepareArtifacts :library:bintrayUploadAll
26+
```

library/build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ android.libraryVariants.all { variant ->
4747

4848
dependencies {
4949
compile project(':database')
50-
compile project(':storage')
5150
compile project(':auth')
5251

5352
androidTestCompile 'junit:junit:4.12'

library/publish.gradle

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ apply from: "../common/constants.gradle"
44
archivesBaseName = 'firebase-ui'
55

66
/**
7-
* Returns list of tasks names that prepareArtfacts should depend on,
7+
* Returns list of tasks names that prepareArtfacts should depend on.
88
*/
99
def prepareArtifactsTasks() {
1010
return project.ext.submodules.collect { name ->
@@ -24,6 +24,15 @@ def publishToRepoTasks(repo) {
2424
}.toArray()
2525
}
2626

27+
/**
28+
* Returns a list of task names to upload modules to bintray.
29+
*/
30+
def bintrayUploadTasks() {
31+
return project.ext.submodules.collect { name ->
32+
":${name}:bintrayUpload"
33+
}.toArray()
34+
}
35+
2736
task sourcesJar(type: Jar) {
2837
classifier = 'sources'
2938
from android.sourceSets.main.java.srcDirs
@@ -56,6 +65,7 @@ task prepareArtifacts(dependsOn: [
5665
task publishAllToMavenLocal(dependsOn: [
5766
'publishMonolithLibraryPublicationToMavenLocal',
5867
publishToRepoTasks('MavenLocal')]) {
68+
5969
}
6070

6171
/**
@@ -67,6 +77,15 @@ task publishAllToCustomLocal(dependsOn: [
6777

6878
}
6979

80+
/**
81+
* Upload all artifacts to bintray.
82+
*/
83+
task bintrayUploadAll(dependsOn: [
84+
'bintrayUpload',
85+
bintrayUploadTasks()]) {
86+
87+
}
88+
7089
artifacts {
7190
archives javadocJar
7291
archives sourcesJar

settings.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
include ':app', ':common', ':library', ':database', ':storage', ':ui_flow', ':auth'
1+
include ':app', ':common', ':library', ':database', ':auth'

storage/.gitignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

storage/build.gradle

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

storage/proguard-rules.pro

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

storage/src/main/AndroidManifest.xml

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

0 commit comments

Comments
 (0)