1-
21buildscript {
32 repositories {
43 mavenCentral()
@@ -10,10 +9,10 @@ buildscript {
109
1110apply plugin : ' com.android.library'
1211apply plugin : ' maven'
12+ apply plugin : ' signing'
1313
1414repositories {
1515 mavenCentral()
16- maven { url ' http://wordpress-mobile.github.io/WordPress-Android' }
1716}
1817
1918dependencies {
@@ -29,23 +28,64 @@ android {
2928 buildToolsVersion " 21.1.1"
3029
3130 defaultConfig {
32- versionName " 1.2 .0"
31+ versionName " 1.3 .0"
3332 minSdkVersion 14
3433 targetSdkVersion 19
3534 }
3635}
3736
37+ signing {
38+ required {
39+ project. properties. containsKey(" signing.keyId" ) && project. properties. containsKey(" signing.secretKeyRingFile" )
40+ }
41+ sign configurations. archives
42+ }
43+
44+ version android. defaultConfig. versionName
45+ group = " org.wordpress"
46+ archivesBaseName = " utils"
47+
48+ // http://central.sonatype.org/pages/gradle.html
49+
3850uploadArchives {
3951 repositories {
4052 mavenDeployer {
41- def repo_url = " "
42- if (project. hasProperty(" repository" )) {
43- repo_url = project. repository
53+ beforeDeployment { MavenDeployment deployment -> signing. signPom(deployment) }
54+
55+ repository(url : " https://oss.sonatype.org/service/local/staging/deploy/maven2/" ) {
56+ authentication(userName : project. properties. ossrhUsername, password : project. properties. ossrhPassword)
57+ }
58+
59+ snapshotRepository(url : " https://oss.sonatype.org/content/repositories/snapshots/" ) {
60+ authentication(userName : project. properties. ossrhUsername, password : project. properties. ossrhPassword)
61+ }
62+
63+ pom. project {
64+ name ' PersistentEditText'
65+ packaging ' aar'
66+ description ' Android EditText subclass with persistence'
67+ url ' https://github.com/wordpress-mobile/WordPress-Utils-Android'
68+ scm {
69+ connection ' scm:git:https://github.com/wordpress-mobile/WordPress-Utils-Android.git'
70+ developerConnection ' scm:git:https://github.com/wordpress-mobile/WordPress-Utils-Android.git'
71+ url ' https://github.com/wordpress-mobile/WordPress-Utils-Android'
72+ }
73+
74+ licenses {
75+ license {
76+ name ' The MIT License (MIT)'
77+ url ' http://opensource.org/licenses/MIT'
78+ }
79+ }
80+
81+ developers {
82+ developer {
83+ id ' maxme'
84+ name ' Maxime Biais'
85+ email ' maxime@automattic.com'
86+ }
87+ }
4488 }
45- repository(url : repo_url)
46- pom. version = android. defaultConfig. versionName
47- pom. groupId = " org.wordpress"
48- pom. artifactId = " wordpress-utils"
4989 }
5090 }
5191}
0 commit comments