Skip to content

Commit

Permalink
Set minSdk to 8, added tasks for maven publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
curioustechizen committed Feb 14, 2015
1 parent 3197c05 commit 622747a
Show file tree
Hide file tree
Showing 6 changed files with 161 additions and 8 deletions.
32 changes: 32 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
v1.3.0 [Feb 14, 2014]
========

- [CHANGE]: Set minSdk to 8
- [CHANGE]: Cleaned up unnecessary resources
- [MISC]: Update to latest build tools
- [NEW]: Included tasks for publishing to Maven Central


v1.2.0 [Dec 16, 2014]
========

- [BUGFIX]:NPE seen when the RelativeTimeTextView has an initial visibility="gone"
- [BUGFIX]:RelativeTimeTextView does not show anything if the reference time was only set using the XML attribute reference_time
- [MISC]: Updated gradle files to 1.0.0


v1.1.1 [Sep 2, 2014]
========

- [FEATURE]: Added option to add prefix and suffix to the RelativeTimeTextView (Credit @xiprox )
- [MISC]: Updated to recent versions of gradle, gradle plugin, build tools.



v1.1.0 [Aug 21, 2014]
========

- [FEATURE]: Added Gradle Support. (Credit to @intrications )
- [BUGFIX]: #2
- [BUGFIX]: #4

10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,18 @@ Who's Using this Library?
See [here](https://github.com/curioustechizen/android-ago/wiki/Apps-using-android-ago). If you would like to add your app to this list, please edit the wiki.


Android version support statement
========

The library has been tested on API 11 and above. However, theoretically, it works on API 3 and above since all it uses is [DateUtils#getRelativeTimeSpanString](http://developer.android.com/reference/android/text/format/DateUtils.html#getRelativeTimeSpanString(long, long, long, int)).

The minSdkVersion has been set to 8, however do not expect support from me for API version < 11.


###License


Copyright 2013 Kiran Rao
Copyright 2015 Kiran Rao

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
9 changes: 4 additions & 5 deletions android-ago-sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ repositories{
apply plugin: 'com.android.application'

android {
compileSdkVersion 19
compileSdkVersion 21
buildToolsVersion "21.1.2"
defaultConfig {
minSdkVersion 14
targetSdkVersion 17
minSdkVersion 8
targetSdkVersion 21
}
sourceSets {
main {
Expand All @@ -22,6 +22,5 @@ android {
}

dependencies {
//compile project(":android-ago")
compile 'com.github.curioustechizen.android-ago:library:1.2.0'
compile 'com.github.curioustechizen.android-ago:library:1.3.0'
}
4 changes: 3 additions & 1 deletion android-ago/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ android {
compileSdkVersion 21
buildToolsVersion "21.1.2"
defaultConfig {
minSdkVersion 11
minSdkVersion 8
targetSdkVersion 21
}
sourceSets {
Expand All @@ -15,3 +15,5 @@ android {
}
}
}

apply from: 'maven-publish.gradle'
112 changes: 112 additions & 0 deletions android-ago/maven-publish.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
/*
* Copyright 2013 Chris Banes
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

apply plugin: 'maven'
apply plugin: 'signing'

def isReleaseBuild() {
return VERSION_NAME.contains("SNAPSHOT") == false
}

def getReleaseRepositoryUrl() {
return hasProperty('RELEASE_REPOSITORY_URL') ? RELEASE_REPOSITORY_URL
: "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
}

def getSnapshotRepositoryUrl() {
return hasProperty('SNAPSHOT_REPOSITORY_URL') ? SNAPSHOT_REPOSITORY_URL
: "https://oss.sonatype.org/content/repositories/snapshots/"
}

def getRepositoryUsername() {
return hasProperty('NEXUS_USERNAME') ? NEXUS_USERNAME : ""
}

def getRepositoryPassword() {
return hasProperty('NEXUS_PASSWORD') ? NEXUS_PASSWORD : ""
}

afterEvaluate { project ->
uploadArchives {
repositories {
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }

pom.groupId = GROUP
pom.artifactId = POM_ARTIFACT_ID
pom.version = VERSION_NAME

repository(url: getReleaseRepositoryUrl()) {
authentication(userName: getRepositoryUsername(), password: getRepositoryPassword())
}
snapshotRepository(url: getSnapshotRepositoryUrl()) {
authentication(userName: getRepositoryUsername(), password: getRepositoryPassword())
}

pom.project {
name POM_NAME
packaging POM_PACKAGING
description POM_DESCRIPTION
url POM_URL

scm {
url POM_SCM_URL
connection POM_SCM_CONNECTION
developerConnection POM_SCM_DEV_CONNECTION
}

licenses {
license {
name POM_LICENCE_NAME
url POM_LICENCE_URL
distribution POM_LICENCE_DIST
}
}

developers {
developer {
id POM_DEVELOPER_ID
name POM_DEVELOPER_NAME
}
}
}
}
}
}

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

//task androidJavadocs(type: Javadoc) {
//source = android.sourceSets.main.allJava
//}

//task androidJavadocsJar(type: Jar, dependsOn: androidJavadocs) {
//classifier = 'javadoc'
//from androidJavadocs.destinationDir
//}

task androidSourcesJar(type: Jar) {
classifier = 'sources'
from android.sourceSets.main.java.sourceFiles
}

artifacts {
archives androidSourcesJar
}
}
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
include ':android-ago'
include ':android-ago-sample'
include ':android-ago-sample'

0 comments on commit 622747a

Please sign in to comment.