From 4edc93f2d23ddebe01e2df32200ff5ae8b9bb2b7 Mon Sep 17 00:00:00 2001 From: Maxime Biais Date: Wed, 4 Feb 2015 12:55:34 +0100 Subject: [PATCH 001/108] add signing to publish artifact --- build.gradle | 19 ----------- editor/build.gradle | 79 +++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 76 insertions(+), 22 deletions(-) diff --git a/build.gradle b/build.gradle index 234dff0a6edf..e69de29bb2d1 100644 --- a/build.gradle +++ b/build.gradle @@ -1,19 +0,0 @@ -// Top-level build file where you can add configuration options common to all sub-projects/modules. - -buildscript { - repositories { - jcenter() - } - dependencies { - classpath 'com.android.tools.build:gradle:1.0.0-rc4' - - // NOTE: Do not place your application dependencies here; they belong - // in the individual module build.gradle files - } -} - -allprojects { - repositories { - jcenter() - } -} diff --git a/editor/build.gradle b/editor/build.gradle index c714bf3469f7..76718e0c170d 100644 --- a/editor/build.gradle +++ b/editor/build.gradle @@ -1,14 +1,31 @@ +buildscript { + repositories { + mavenCentral() + } + dependencies { + classpath 'com.android.tools.build:gradle:1.0.0' + } +} + apply plugin: 'com.android.library' +apply plugin: 'maven' +apply plugin: 'signing' + +repositories { + mavenCentral() +} android { + publishNonDefault true + compileSdkVersion 21 - buildToolsVersion "21.1.2" + buildToolsVersion "21.1.1" defaultConfig { - minSdkVersion 15 - targetSdkVersion 21 versionCode 1 versionName "1.0" + minSdkVersion 9 + targetSdkVersion 21 } buildTypes { release { @@ -21,3 +38,59 @@ android { dependencies { compile 'com.android.support:appcompat-v7:21.0.3' } + +signing { + required { + project.properties.containsKey("signing.keyId") && project.properties.containsKey("signing.secretKeyRingFile") + } + sign configurations.archives +} + +version android.defaultConfig.versionName +group = "org.wordpress" +archivesBaseName = "editor" + +// http://central.sonatype.org/pages/gradle.html + +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-Android-Editor' + packaging 'aar' + description 'A reusable Android rich text editor component' + url 'https://github.com/wordpress-mobile/WordPress-Android-Editor' + scm { + connection 'scm:git:https://github.com/wordpress-mobile/WordPress-Android-Editor.git' + developerConnection 'scm:git:https://github.com/wordpress-mobile/WordPress-Android-Editor.git' + url 'https://github.com/wordpress-mobile/WordPress-Android-Editor' + } + + licenses { + license { + name 'The MIT License (MIT)' + url 'http://opensource.org/licenses/MIT' + } + } + + developers { + developer { + id 'maxme' + name 'Maxime Biais' + email 'maxime@automattic.com' + } + } + } + } + } +} From b61040ce299ffc2d6eff0bd71f57e73ec0a57628 Mon Sep 17 00:00:00 2001 From: Maxime Biais Date: Wed, 4 Feb 2015 12:56:05 +0100 Subject: [PATCH 002/108] rename package name to org.wordpress.android --- .../org/wordpress/editor/ApplicationTest.java | 2 +- editor/src/main/AndroidManifest.xml | 16 +--------------- .../org/wordpress/editor/EditorActivity.java | 3 ++- 3 files changed, 4 insertions(+), 17 deletions(-) diff --git a/editor/src/androidTest/java/org/wordpress/editor/ApplicationTest.java b/editor/src/androidTest/java/org/wordpress/editor/ApplicationTest.java index dfc7e0def17e..d2db16a8c8d2 100644 --- a/editor/src/androidTest/java/org/wordpress/editor/ApplicationTest.java +++ b/editor/src/androidTest/java/org/wordpress/editor/ApplicationTest.java @@ -1,4 +1,4 @@ -package org.wordpress.editor; +package org.wordpress.android.editor; import android.app.Application; import android.test.ApplicationTestCase; diff --git a/editor/src/main/AndroidManifest.xml b/editor/src/main/AndroidManifest.xml index a5080b935f74..a450a0b8b95f 100644 --- a/editor/src/main/AndroidManifest.xml +++ b/editor/src/main/AndroidManifest.xml @@ -1,19 +1,5 @@ - - - - - - - - - - + package="org.wordpress.android.editor" > diff --git a/editor/src/main/java/org/wordpress/editor/EditorActivity.java b/editor/src/main/java/org/wordpress/editor/EditorActivity.java index 34e44c3c6141..4966f4459497 100644 --- a/editor/src/main/java/org/wordpress/editor/EditorActivity.java +++ b/editor/src/main/java/org/wordpress/editor/EditorActivity.java @@ -1,4 +1,4 @@ -package org.wordpress.editor; +package org.wordpress.android.editor; import android.annotation.SuppressLint; import android.content.res.AssetManager; @@ -17,6 +17,7 @@ import java.io.InputStream; import java.io.InputStreamReader; +// TODO: use AppLog instead of Log public class EditorActivity extends ActionBarActivity { WebView mWebView; From 66fb19b86abceff52dd058a5458896378e3b5411 Mon Sep 17 00:00:00 2001 From: Maxime Biais Date: Wed, 4 Feb 2015 12:56:55 +0100 Subject: [PATCH 003/108] rename package name to org.wordpress.android --- .../java/org/wordpress/editorexample/ApplicationTest.java | 2 +- example/src/main/AndroidManifest.xml | 2 +- .../java/org/wordpress/editorexample/ExampleActivity.java | 4 ++-- example/src/main/res/layout/activity_example.xml | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/example/src/androidTest/java/org/wordpress/editorexample/ApplicationTest.java b/example/src/androidTest/java/org/wordpress/editorexample/ApplicationTest.java index 87b7b7cb929f..2d8225ce4edc 100644 --- a/example/src/androidTest/java/org/wordpress/editorexample/ApplicationTest.java +++ b/example/src/androidTest/java/org/wordpress/editorexample/ApplicationTest.java @@ -1,4 +1,4 @@ -package org.wordpress.editorexample; +package org.wordpress.android.editorexample; import android.app.Application; import android.test.ApplicationTestCase; diff --git a/example/src/main/AndroidManifest.xml b/example/src/main/AndroidManifest.xml index 654e894a6c34..bc846e1a6fc4 100644 --- a/example/src/main/AndroidManifest.xml +++ b/example/src/main/AndroidManifest.xml @@ -1,6 +1,6 @@ + package="org.wordpress.android.editorexample" > + tools:context="org.wordpress.android.editorexample.ExampleActivity">