Skip to content

Commit

Permalink
Merge pull request #6 from wordpress-mobile/feature/publish-to-bintray
Browse files Browse the repository at this point in the history
Publish the maven artifact to bintray
  • Loading branch information
theck13 committed Sep 7, 2016
2 parents ff55402 + c2f2939 commit e2fca68
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 64 deletions.
26 changes: 24 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
# WordPress-Utils-Android

Part of the [WordPress-Android] project.
Collection of utility methods for Android and WordPress.

[WordPress-Android]: https://github.com/wordpress-mobile/WordPress-Android
## Use the library

* In your build.gradle:
```groovy
dependencies {
// use the latest 1.x version
compile 'org.wordpress:utils:1.+'
}
```

## Publish it to bintray

```shell
$ ./gradlew assemble publishToMavenLocal bintrayUpload -PbintrayUser=FIXME -PbintrayKey=FIXME -PdryRun=false
```

## Apps that use this library
- [WordPress for Android][1]

## License
Dual licensed under MIT, and GPL.

[1]: https://github.com/wordpress-mobile/WordPress-Android
74 changes: 16 additions & 58 deletions WordPressUtils/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.2'
classpath 'com.novoda:bintray-release:0.3.4'
}
}

apply plugin: 'com.android.library'
apply plugin: 'maven'
apply plugin: 'signing'
apply plugin: 'com.novoda.bintray-release'

repositories {
jcenter()
Expand All @@ -32,68 +32,13 @@ android {
buildToolsVersion "23.0.3"

defaultConfig {
versionName "1.11.0"
versionName "1.12.0"
minSdkVersion 14
targetSdkVersion 23
}
}

version android.defaultConfig.versionName
group = "org.wordpress"
archivesBaseName = "utils"

signing {
required {
has("release") && project.properties.containsKey("signing.keyId") && project.properties.containsKey("signing.secretKeyRingFile")
}
sign configurations.archives
}

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

repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
authentication(userName: project.properties.ossrhUsername, password: project.properties.ossrhPassword)
}

snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
authentication(userName: project.properties.ossrhUsername, password: project.properties.ossrhPassword)
}

pom.project {
name 'WordPress-Utils-Android'
packaging 'aar'
description 'Utils lib for WordPress-Android'
url 'https://github.com/wordpress-mobile/WordPress-Utils-Android'
scm {
connection 'scm:git:https://github.com/wordpress-mobile/WordPress-Utils-Android.git'
developerConnection 'scm:git:https://github.com/wordpress-mobile/WordPress-Utils-Android.git'
url 'https://github.com/wordpress-mobile/WordPress-Utils-Android'
}

licenses {
license {
name 'The MIT License (MIT)'
url 'http://opensource.org/licenses/MIT'
}
}

developers {
developer {
id 'maxme'
name 'Maxime Biais'
email 'maxime@automattic.com'
}
}
}
}
}
}

android.libraryVariants.all { variant ->

task("generate${variant.name}Javadoc", type: Javadoc) {
description "Generates Javadoc for $variant.name."
source = variant.javaCompile.source
Expand All @@ -105,3 +50,16 @@ android.libraryVariants.all { variant ->
exclude '**/R.java'
}
}

publish {
artifactId = 'utils'
userOrg = 'wordpress-mobile'
groupId = 'org.wordpress'
uploadName = 'utils'
description = 'Utils library for Android'
publishVersion = android.defaultConfig.versionName
licences = ['MIT', 'GPL']
website = 'https://github.com/wordpress-mobile/WordPress-Utils-Android/'
dryRun = 'false'
autoPublish = 'true'
}
Original file line number Diff line number Diff line change
Expand Up @@ -225,10 +225,10 @@ public static String replaceUnicodeSurrogateBlocksWithHTMLEntities(final String
* Used to convert a language code ([lc]_[rc] where lc is language code (en, fr, es, etc...)
* and rc is region code (zh-CN, zh-HK, zh-TW, etc...) to a displayable string with the languages
* name.
* <p/>
*
* The input string must be between 2 and 6 characters, inclusive. An empty string is returned
* if that is not the case.
* <p/>
*
* If the input string is recognized by {@link Locale} the result of this method is the given
*
* @return non-null
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 Jul 09 11:48:51 CEST 2014
#Tue Sep 06 11:08:13 CEST 2016
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip

0 comments on commit e2fca68

Please sign in to comment.