Skip to content

Commit 8299d6c

Browse files
committed
A few more steps towards an automated build
1 parent e290ab0 commit 8299d6c

File tree

4 files changed

+19
-69
lines changed

4 files changed

+19
-69
lines changed

README.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -313,9 +313,19 @@ with:
313313
### to build a release
314314

315315
* build the project in Android Studio or with Gradle
316-
*
316+
* this generates the main binary: `library/build/outputs/aar/library-debug.aar`
317+
* open the Gradle projects tab, by clicking the tiny gradle tab on the right (or View > Tool Windows > Gradle)
318+
* select :library > Tasks > other > bundleReleaseJavadoc
319+
* this generates the javadoc: `library/build/outputs/library-javadoc.jar`
317320

318-
### to deploy a release
321+
322+
### to tag a release on Github
323+
324+
* ensure that all your changes are on master and that your local build is on master
325+
* ensure that the correct version number is in both `library/build.gradle` and `library/pom.xml`
326+
327+
328+
### to deploy a release to Maven Central
319329

320330
* log onto the build box
321331
* checkout and update the master branch

library/build.gradle

Lines changed: 2 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ android {
88
minSdkVersion 10
99
targetSdkVersion 22
1010
versionCode 1
11-
versionName "0.1.0"
11+
versionName "0.2.0"
1212
}
1313
buildTypes {
1414
release {
1515
minifyEnabled false
1616
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
17-
}
17+
}
1818
}
1919
packagingOptions {
2020
exclude 'META-INF/LICENSE'
@@ -38,67 +38,6 @@ android.libraryVariants.all { variant ->
3838
from tasks["generate${variant.name.capitalize()}Javadoc"]
3939
}
4040
}
41-
//apply plugin: 'maven'
42-
//apply plugin: 'signing'
43-
//
44-
//version = "0.1.0"
45-
//group = "com.firebase"
46-
//
47-
//configurations {
48-
// archives {
49-
// extendsFrom configurations.default
50-
// }
51-
//}
52-
//
53-
//signing {
54-
// required { has("release") && gradle.taskGraph.hasTask("uploadArchives") }
55-
// sign configurations.archives
56-
//}
57-
//
58-
//uploadArchives {
59-
// configuration = configurations.archives
60-
// repositories.mavenDeployer {
61-
// beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
62-
//
63-
// repository(url: sonatypeRepo) {
64-
// authentication(userName: sonatypeUsername,
65-
// password: sonatypePassword)
66-
// }
67-
//
68-
// pom.project {
69-
// name 'FirebaseUI'
70-
// packaging 'aar'
71-
// description 'FirebaseUI library for Android applications'
72-
// url 'https://github.com/firebase/FirebaseUI-Android'
73-
//
74-
// scm {
75-
// url 'scm:[email protected]/firebase/FirebaseUI-Android'
76-
// connection 'scm:git:[email protected]:firebase/FirebaseUI-Android.git'
77-
// developerConnection 'scm:git:[email protected]:firebase/FirebaseUI-Android.git'
78-
// }
79-
//
80-
// organization {
81-
// name 'Firebase'
82-
// url 'https://www.firebase.com/'
83-
// }
84-
//
85-
// licenses {
86-
// license {
87-
// name 'MIT'
88-
// url 'http://firebase.mit-license.org'
89-
// }
90-
// }
91-
//
92-
// developers {
93-
// developer {
94-
// id 'puf'
95-
// name 'Frank van Puffelen'
96-
97-
// }
98-
// }
99-
// }
100-
// }
101-
//}
10241

10342
dependencies {
10443
compile fileTree(dir: 'libs', include: ['*.jar'])

library/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<name>FirebaseUI-Android</name>
77
<description>FirebaseUI library for Android applications</description>
88
<url>https://github.com/firebase/FirebaseUI-Android</url>
9-
<version>0.1.0</version>
9+
<version>0.2.0</version>
1010
<packaging>aar</packaging>
1111
<scm>
1212
<url>scm:[email protected]/firebase/FirebaseUI-Android</url>

release.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ if [[ ! -z $DERP ]]; then
2929
echo "Cancelling release, please update library/build.gradle with the desired version"
3030
fi
3131

32+
# TODO: Ensure this version is also on pom.xml
33+
3234
# Ensure there is not an existing git tag for the new version
3335
# XXX this is wrong; needs to be semver sorted as my other scripts are
3436
LAST_GIT_TAG="$(git tag --list | tail -1 | awk -F 'v' '{print $2}')"
@@ -48,9 +50,8 @@ fi
4850
# GENERATE RELEASE BUILD #
4951
##########################
5052

51-
#gradle clean assembleRelease generateReleaseJavadoc
52-
gradle clean assembleRelease
53-
# gradle uploadArchives
53+
#gradle clean assembleRelease assembleDebug bundleReleaseJavadoc
54+
gradle clean :app:compileDebugSources :app:compileDebugAndroidTestSources :library:compileDebugSources :library:compileDebugAndroidTestSources bundleReleaseJavadoc
5455

5556
###################
5657
# DEPLOY TO MAVEN #

0 commit comments

Comments
 (0)