diff --git a/README.md b/README.md index acdea87c1..3d81d6511 100644 --- a/README.md +++ b/README.md @@ -222,10 +222,45 @@ Et voila: a minimal, yet fully functional, chat app in about 30 lines of code. N ## Deployment +### To get the build server ready to build/deploy FirebaseUI-Android + +* Install a JDK (if it's not installed yet): +* `sudo apt-get install default-jdk` +* Run `./gradlew` (which will install gradle if it's not yet installed) +* Install the Android SDK tool for Linux +* `wget http://dl.google.com/android/android-sdk_r22.0.5-linux.tgz` +* `tar -xvzf android-sdk_r22.0.5-linux.tgz` +* Add the android SDK path to `.bashrc`: +* `export ANDROID_HOME=~/android-sdk-linux/` +* `export PATH=$PATH:~/android-sdk-linux/tools` +* Install the Android SDK needed for FirebaseUI +* `android update sdk -u` +* `android list sdk --all` +* `android update sdk -u --all --filter platform-tools,android-22,extra-android-support` +* `android update sdk --no-ui --filter extra` +* The Android aapt tool is 32-bit only. If the machine is 64-bit, we'll need to install some compatibility libraries: +* `uname -a` +* > Linux puf 3.16.0-45-generic #60~14.04.1-Ubuntu SMP Fri Jul 24 21:16:23 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux +* `sudo apt-get install lib32stdc++6` +* `sudo apt-get install lib32z1` +* Run `./gradlew` to ensure it loads/parses the project +* Now run a build `./gradlew build` +* Set up for signing and uploading the aar +* `vi ~/.gradle/gradle.properties` + signing.keyId=94B86DB8 + signing.password=PrivateKeyPassword + signing.secretKeyRingFile=/path/to/gpg/secring.gpg + + sonatypeRepo=https://oss.sonatype.org/service/local/staging/deploy/maven2/ + sonatypeUsername=YourSonatypeJiraUsername + sonatypePassword=YourSonatypeJiraPassword + + +### to build/deploy + * log onto the build box -* ensure that appcompat-v7 and recyclerview-v7 are in the local maven * checkout and update the master branch -* `./release.sh` to build the client and update maven +* `./release.sh` to build the library and update maven * close/release the repository from sonatype ## Contributor License Agreements diff --git a/app/build.gradle b/app/build.gradle index 98deec1fe..e623157e1 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -2,7 +2,7 @@ apply plugin: 'com.android.application' android { compileSdkVersion 22 - buildToolsVersion "23.0.0 rc2" + buildToolsVersion "22.0.1" defaultConfig { applicationId "com.firebase.firebaseui_android" diff --git a/library/build.gradle b/library/build.gradle index 3eeb113dc..f02be6334 100644 --- a/library/build.gradle +++ b/library/build.gradle @@ -2,7 +2,7 @@ apply plugin: 'com.android.library' android { compileSdkVersion 22 - buildToolsVersion "23.0.0 rc2" + buildToolsVersion "22.0.1" defaultConfig { minSdkVersion 10 @@ -32,6 +32,69 @@ android { // options.links("http://d.android.com/reference/"); // } //} + +apply plugin: 'maven' +apply plugin: 'signing' + +version = "0.1.0" +group = "com.firebase.puf" + +configurations { + archives { + extendsFrom configurations.default + } +} + +signing { + required { has("release") && gradle.taskGraph.hasTask("uploadArchives") } + sign configurations.archives +} + +uploadArchives { + configuration = configurations.archives + repositories.mavenDeployer { + beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) } + + repository(url: sonatypeRepo) { + authentication(userName: sonatypeUsername, + password: sonatypePassword) + } + + pom.project { + name 'FirebaseUI' + packaging 'aar' + description 'FirebaseUI library for Android applications' + url 'https://github.com/firebase/FirebaseUI-Android' + + scm { + url 'scm:git@github.com/firebase/FirebaseUI-Android' + connection 'scm:git:git@github.com:firebase/FirebaseUI-Android.git' + developerConnection 'scm:git:git@github.com:firebase/FirebaseUI-Android.git' + } + + organization { + name 'Firebase' + url 'https://www.firebase.com/' + } + + licenses { + license { + name 'MIT' + url 'http://firebase.mit-license.org' + } + } + + developers { + developer { + id 'puf' + name 'Frank van Puffelen' + email 'puf@google.com' + } + } + } + } +} + dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) compile 'com.android.support:appcompat-v7:22.2.0' diff --git a/library/library.iml b/library/library.iml index 4e6a41c2f..abc281b66 100644 --- a/library/library.iml +++ b/library/library.iml @@ -1,5 +1,5 @@ - + @@ -65,7 +65,6 @@ - @@ -87,6 +86,7 @@ + diff --git a/release.sh b/release.sh index 60d97797d..890fc1371 100755 --- a/release.sh +++ b/release.sh @@ -50,6 +50,7 @@ fi #gradle clean assembleRelease generateReleaseJavadoc gradle clean assembleRelease +# gradle uploadArchives ################### # DEPLOY TO MAVEN #