diff --git a/.gitignore b/.gitignore index f29e858..855291a 100644 --- a/.gitignore +++ b/.gitignore @@ -6,5 +6,6 @@ build # IntelliJ IDEA .idea *.iml +gradle.properties -.DS_Store \ No newline at end of file +.DS_Store diff --git a/build.gradle b/build.gradle index 80eec1a..7a10ca5 100644 --- a/build.gradle +++ b/build.gradle @@ -5,7 +5,7 @@ buildscript { mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:0.9.+' + classpath 'com.android.tools.build:gradle:0.12.+' } } @@ -13,4 +13,9 @@ allprojects { repositories { mavenCentral() } + + allprojects { + group = 'org.michaelevans.chromahashview' + version = '0.1' + } } diff --git a/demo/build.gradle b/demo/build.gradle index 5fceef9..1b99450 100644 --- a/demo/build.gradle +++ b/demo/build.gradle @@ -2,7 +2,7 @@ apply plugin: 'android' android { compileSdkVersion 19 - buildToolsVersion "19.0.3" + buildToolsVersion "19.1.0" defaultConfig { minSdkVersion 14 diff --git a/gradle.properties b/gradle.properties index 5d08ba7..2491464 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,18 +1,7 @@ -# Project-wide Gradle settings. +bintray_api_base_url=https://api.bintray.com +bintray_repo=android-libs +bintray_package=org.michaelevans.chromahashview -# IDE (e.g. Android Studio) users: -# Settings specified in this file will override any Gradle settings -# configured through the IDE. - -# For more details on how to configure your build environment visit -# http://www.gradle.org/docs/current/userguide/build_environment.html - -# Specifies the JVM arguments used for the daemon process. -# The setting is particularly useful for tweaking memory settings. -# Default value: -Xmx10248m -XX:MaxPermSize=256m -# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 - -# When configured, Gradle will run in incubating parallel mode. -# This option should only be used with decoupled projects. More details, visit -# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects -# org.gradle.parallel=true \ No newline at end of file +# Please include these values at USER_HOME/.gradle/gradle.properties. +# bintray_username=you_user +# bintray_api_key=your_api_key diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 5de946b..1e61d1f 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ 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 diff --git a/library/build.gradle b/library/build.gradle index c3f99eb..cc5571f 100644 --- a/library/build.gradle +++ b/library/build.gradle @@ -1,14 +1,16 @@ apply plugin: 'android-library' +apply plugin: 'maven' + android { compileSdkVersion 19 - buildToolsVersion "19.0.3" + buildToolsVersion "19.1.0" defaultConfig { minSdkVersion 5 targetSdkVersion 19 versionCode 1 - versionName "1.0" + versionName version } buildTypes { release { @@ -18,6 +20,54 @@ android { } } -dependencies { - compile fileTree(dir: 'libs', include: ['*.jar']) +// Publish to maven repository + +task sourcesJar(type: Jar) { + classifier 'sources' + from android.sourceSets.main.java.sourceFiles +} + +artifacts { + archives sourcesJar +} + +uploadArchives { + repositories { + mavenDeployer { + + repository(url: "${bintray_api_base_url}/maven/${bintray_username}/${bintray_repo}/${bintray_package}") { + authentication(userName: bintray_username, password: bintray_api_key) + } + pom.project { + artifactId 'ChromeHashView' + name 'ChromeHashView' + packaging 'jar' + description 'Chroma-Hash is a concept for visualizing secure text input using ambient color bars concept. This library is the Android port' + url 'https://github.com/MichaelEvans/ChromaHashView' + inceptionYear 2014 + + scm { + url 'git@github.com:MichaelEvans/ChromaHashView.git' + connection 'git@github.com:MichaelEvans/ChromaHashView.git' + developerConnection 'git@github.com:MichaelEvans/ChromaHashView.git' + } + + licenses { + license { + name 'Apache License, Version 2.0' + url 'http://www.apache.org/licenses/LICENSE-2.0.txt' + distribution 'repo' + } + } + + developers { + developer { + id 'MichaelEvans' + name 'Michael Evans' + email '' + } + } + } + } + } }