Skip to content

Commit

Permalink
Use Circle CI instead of Travis CI
Browse files Browse the repository at this point in the history
  • Loading branch information
rockerhieu committed Jul 30, 2014
1 parent e5ab852 commit 7e5f046
Show file tree
Hide file tree
Showing 14 changed files with 233 additions and 217 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
.DS_Store
.idea
atlassian-ide-plugin.xml
gradle.properties
example/src/main/bin
library/src/main/bin
library/src/main/gen
Expand Down
30 changes: 0 additions & 30 deletions .travis.yml

This file was deleted.

3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ Do you like emojis in Whatsapp, iMessage? [Emojicon](http://rockerhieu.github.io

Fore more information please see [the website](http://rockerhieu.github.io/emojicon/)

Branch `master`: [![Build Status](https://travis-ci.org/rockerhieu/emojicon.png?branch=master)](https://travis-ci.org/rockerhieu/emojicon) [ ![Codeship Status for rockerhieu/emojicon](https://codeship.io/projects/99f69db0-f078-0131-77d8-7a2ec608695e/status)](https://codeship.io/projects/27402)
`emojicon` on `develop` ![develop on Circle CI](https://circleci.com/gh/rockerhieu/emojicon/tree/develop.png?circle-token=3360549339f6271f6db44c24e23339ba75c054f4)
`emojicon` on `master` ![master on Circle CI](https://circleci.com/gh/rockerhieu/emojicon/tree/master.png?circle-token=3360549339f6271f6db44c24e23339ba75c054f4)

## Example

Expand Down
31 changes: 2 additions & 29 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,39 +5,12 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.9.+'
classpath 'com.android.tools.build:gradle:0.12.+'
}
}

allprojects {
repositories {
mavenCentral()
}
}

/*
import org.gradle.plugins.signing.Sign
gradle.taskGraph.whenReady { taskGraph ->
if (taskGraph.allTasks.any { it instanceof Sign }) {
def hasKeyId = project.hasProperty('signing.keyId')
def hasSecretKeyRingFile = project.hasProperty('signing.secretKeyRingFile')
def hasPassword = project.hasProperty('signing.password')
if (!hasKeyId || !hasSecretKeyRingFile || !hasPassword) {
// Use Java 6's console to read from the console (no good for a CI environment)
Console console = System.console()
console.printf "\n\nWe have to sign some things in this build.\n\nPlease enter your signing details.\n\n"
def id = console.readLine("PGP Key Id: ")
def file = console.readLine("PGP Secret Key Ring File (absolute path): ")
def password = console.readPassword("PGP Private Key Password: ")
allprojects { ext."signing.keyId" = id }
allprojects { ext."signing.secretKeyRingFile" = file }
allprojects { ext."signing.password" = password }
console.printf "\nThanks.\n\n"
}
}
}
*/
}
33 changes: 33 additions & 0 deletions circle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
machine:
environment:
ANDROID_HOME: /usr/local/android-sdk-linux
java:
version: oraclejdk7

dependencies:
pre:
- echo y | android update sdk --no-ui --all --filter "tools,platform-tools"
- echo y | android update sdk --no-ui --all --filter "android-20,build-tools-20.0.0"
override:
- ./gradlew dependencies

test:
override:
- ./gradlew check

post:
- ls
- ls app
- ls app/build
- mkdir $CIRCLE_ARTIFACTS/lint
- mv app/build/outputs/lint-results* $CIRCLE_ARTIFACTS/lint

deployment:
staging:
branch: develop
commands:
- ./gradlew assemble uploadArchives
release:
branch: master
commands:
- ./gradlew assemble uploadArchives
8 changes: 7 additions & 1 deletion emojicon.iml
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<module external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" external.system.module.group="" external.system.module.version="unspecified" type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="java-gradle" name="Java-Gradle">
<configuration>
<option name="BUILD_FOLDER_PATH" value="$MODULE_DIR$/build" />
</configuration>
</facet>
</component>
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/.gradle" />
<excludeFolder url="file://$MODULE_DIR$/build" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
Expand Down
10 changes: 5 additions & 5 deletions example/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@
* limitations under the License.
*/

apply plugin: 'android'
apply plugin: 'com.android.application'

android {
compileSdkVersion 19
buildToolsVersion "19.0.1"
compileSdkVersion 20
buildToolsVersion "20.0.0"

defaultConfig {
minSdkVersion 8
targetSdkVersion 19
targetSdkVersion 20
versionCode 1
versionName "1.0"
}
Expand Down Expand Up @@ -57,6 +57,6 @@ if (project.hasProperty('keystorepassword')) {
}

dependencies {
compile 'com.android.support:appcompat-v7:+'
compile 'com.android.support:appcompat-v7:19+'
compile project(':library')
}
37 changes: 14 additions & 23 deletions example/example.iml
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,19 @@
</facet>
</component>
<component name="NewModuleRootManager" inherit-compiler-output="false">
<output url="file://$MODULE_DIR$/build/classes/debug" />
<output url="file://$MODULE_DIR$/build/intermediates/classes/debug" />
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/build/source/r/debug" isTestSource="false" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/source/aidl/debug" isTestSource="false" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/source/buildConfig/debug" isTestSource="false" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/source/rs/debug" isTestSource="false" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/res/rs/debug" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/build/source/r/test/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/source/aidl/test/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/source/buildConfig/test/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/source/rs/test/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/res/rs/test/debug" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/debug" isTestSource="false" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/debug" isTestSource="false" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/debug" isTestSource="false" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/debug" isTestSource="false" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/debug" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/test/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/test/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/test/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/test/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/test/debug" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/res" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/resources" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/aidl" isTestSource="false" />
Expand All @@ -56,19 +56,10 @@
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/jni" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/build/apk" />
<excludeFolder url="file://$MODULE_DIR$/build/assets" />
<excludeFolder url="file://$MODULE_DIR$/build/bundles" />
<excludeFolder url="file://$MODULE_DIR$/build/classes" />
<excludeFolder url="file://$MODULE_DIR$/build/dependency-cache" />
<excludeFolder url="file://$MODULE_DIR$/build/incremental" />
<excludeFolder url="file://$MODULE_DIR$/build/libs" />
<excludeFolder url="file://$MODULE_DIR$/build/manifests" />
<excludeFolder url="file://$MODULE_DIR$/build/res" />
<excludeFolder url="file://$MODULE_DIR$/build/symbols" />
<excludeFolder url="file://$MODULE_DIR$/build/tmp" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates" />
<excludeFolder url="file://$MODULE_DIR$/build/outputs" />
</content>
<orderEntry type="jdk" jdkName="Android API 19 Platform" jdkType="Android SDK" />
<orderEntry type="jdk" jdkName="Android API 20 Platform" jdkType="Android SDK" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" exported="" name="appcompat-v7-19.1.0" level="project" />
<orderEntry type="library" exported="" name="support-v4-19.1.0" level="project" />
Expand Down
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Wed Apr 10 15:27:10 PDT 2013
#Thu Jul 31 00:43:04 GMT+07:00 2014
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=http\://services.gradle.org/distributions/gradle-1.10-all.zip
distributionUrl=http\://services.gradle.org/distributions/gradle-1.12-all.zip
23 changes: 0 additions & 23 deletions initiate-publish.sh

This file was deleted.

84 changes: 5 additions & 79 deletions library/build.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
apply plugin: 'android-library'
apply plugin: 'maven'
apply plugin: 'signing'
apply plugin: 'com.android.library'
apply from: 'gradle-mvn-push.gradle'

ext.emojiconVersionName = "1.1-SNAPSHOT"
android {
compileSdkVersion 19
buildToolsVersion "19.0.1"
compileSdkVersion 20
buildToolsVersion "20.0.0"

defaultConfig {
minSdkVersion 8
Expand All @@ -19,78 +18,5 @@ android {
}

dependencies {
compile 'com.android.support:support-v4:+'
}

group = 'com.rockerhieu.emojicon'
version = emojiconVersionName
ext.isReleaseVersion = !version.endsWith("SNAPSHOT")

uploadArchives {
repositories {
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
repository(url: "file://$buildDir/aar")
}

mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }

repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2") {
authentication(userName: "$System.env.SONATYPE_USERNAME", password: "$System.env.SONATYPE_PASSWORD")
}

snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots") {
authentication(userName: "$System.env.SONATYPE_USERNAME", password: "$System.env.SONATYPE_PASSWORD")
}

pom.project {
artifactId = 'library'
name = 'Emojicon'
description 'A library to show emoji in TextView, EditText (like WhatsApp) for Android'
url 'http://rockerhieu.com/emojicon'

scm {
url 'scm:[email protected]:rockerhieu/emojicon.git'
connection 'scm:[email protected]:rockerhieu/emojicon.git'
developerConnection 'scm:[email protected]:rockerhieu/emojicon.git'
}

licenses {
license {
name 'The Apache Software License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
distribution 'repo'
}
}

developers {
developer {
id 'rockerhieu'
name 'Hieu Rocker'
}
}
}
}
}
}

task sourcesJar(type: Jar) {
from android.sourceSets.main.allJava
classifier = 'sources'
}

artifacts {
archives sourcesJar
}

signing {
required { isReleaseVersion && gradle.taskGraph.hasTask("uploadArchives") }
sign configurations.archives
}

task getVersion << {
println "$System.env.SONATYPE_USERNAME"
println "$System.env.SONATYPE_PASSWORD"
println version
compile 'com.android.support:support-v4:19+'
}
Loading

0 comments on commit 7e5f046

Please sign in to comment.