Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
language: android
jdk: oraclejdk7
sudo: false
jdk: oraclejdk8
sudo: required

notifications:
# Slack notification on failure (secured token).
Expand All @@ -17,18 +17,23 @@ android:
- extra-android-support
- platform-tools
- tools
- build-tools-23.0.3
- android-23
- build-tools-24.0.0
- android-24

env:
global:
- MALLOC_ARENA_MAX=2
- GRADLE_OPTS="-XX:MaxPermSize=4g -Xmx4g"
- ANDROID_SDKS=android-14
- ANDROID_TARGET=android-14

before_install:
# TODO: Remove the following line when Travis' platform-tools are updated to v24+
- echo yes | android update sdk -a --filter platform-tools --no-ui --force

install:
# Setup gradle.properties
- cp WordPress/gradle.properties-example WordPress/gradle.properties

script:
- ./gradlew -PdisablePreDex assembleVanillaRelease lint || (grep -A20 -B2 'severity="Error"' WordPress/build/outputs/lint-results.xml; exit 1)
- ./gradlew -PdisablePreDex assembleVanillaRelease lint || (grep -A20 -B2 'severity="Error"' WordPress/build/outputs/lint-results-vanillaDebug.xml; exit 1)
35 changes: 20 additions & 15 deletions WordPress/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ buildscript {
repositories {
jcenter()
maven { url 'https://maven.fabric.io/public' }

}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.2'
Expand All @@ -25,18 +26,20 @@ android {

dexOptions {
jumboMode = true
javaMaxHeapSize = "4g"
}

compileSdkVersion 23
buildToolsVersion "23.0.3"
compileSdkVersion 24
buildToolsVersion "24.0.0"

defaultConfig {
applicationId "org.wordpress.android"
versionName "alpha-15"
versionCode 279
minSdkVersion 16
targetSdkVersion 23
targetSdkVersion 24

multiDexEnabled true
vectorDrawables.useSupportLibrary = true
buildConfigField "boolean", "IN_APP_BILLING_AVAILABLE", "false"
}
Expand All @@ -52,18 +55,20 @@ android {
wasabi { // "hot" version, can be installed along release, alpha or beta versions
buildConfigField "boolean", "IN_APP_BILLING_AVAILABLE", "true"
applicationId "org.wordpress.android.beta"
minSdkVersion 21 // to take advantage of "fast" multi dex (pre-dex each module)
}
}

buildTypes {
release {
// Proguard is only used to fix an issue with some Samsung device
// https://github.com/wordpress-mobile/WordPress-Android/issues/2151
// Proguard is used to shrink our apk, and reduce the number of methods in our final apk,
// but we don't obfuscate the bytecode.
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard.cfg'
}

debug {
minifyEnabled false
buildConfigField "String", "APP_PN_KEY", "\"org.wordpress.android.debug.build\""
ext.enableCrashlytics = false
}
Expand All @@ -85,20 +90,22 @@ dependencies {
}
compile 'com.google.code.gson:gson:2.6.+'
compile 'org.ccil.cowan.tagsoup:tagsoup:1.2.1'
compile 'com.android.support:support-v13:23.4.0'
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.android.support:cardview-v7:23.4.0'
compile 'com.android.support:recyclerview-v7:23.4.0'
compile 'com.android.support:design:23.4.0'
compile 'com.android.support:percent:23.4.0'
compile 'com.google.android.gms:play-services-gcm:8.4.0'
compile 'com.google.android.gms:play-services-auth:8.4.0'
compile 'com.android.support:multidex:1.0.1'
compile 'com.android.support:support-v13:24.0.0'
compile 'com.android.support:appcompat-v7:24.0.0'
compile 'com.android.support:cardview-v7:24.0.0'
compile 'com.android.support:recyclerview-v7:24.0.0'
compile 'com.android.support:design:24.0.0'
compile 'com.android.support:percent:24.0.0'
compile 'com.google.android.gms:play-services-gcm:9.0.2'
compile 'com.google.android.gms:play-services-auth:9.0.2'
compile 'com.github.chrisbanes.photoview:library:1.2.4'
compile 'com.helpshift:android-helpshift-aar:4.4.0'
compile 'de.greenrobot:eventbus:2.4.0'
compile 'com.automattic:rest:1.0.7'
compile 'org.wordpress:graphview:3.4.0'
compile 'org.wordpress:persistentedittext:1.0.1'
compile 'org.wordpress:emailchecker2:1.1.0'

compile 'com.yalantis:ucrop:1.5.0'
compile 'com.github.xizzhu:simple-tool-tip:0.5.0'
Expand All @@ -108,12 +115,10 @@ dependencies {
androidTestCompile 'org.mockito:mockito-core:+'
androidTestCompile 'com.squareup.okhttp:mockwebserver:2.7.5'


// Provided by the WordPress-Android Repository
compile 'org.wordpress:drag-sort-listview:0.6.1' // not found in maven central
compile 'org.wordpress:slidinguppanel:1.0.0' // not found in maven central
compile 'org.wordpress:passcodelock:1.2.0'
compile 'org.wordpress:emailchecker:0.3'

// Simperium
compile 'com.simperium.android:simperium:0.6.8'
Expand Down
7 changes: 1 addition & 6 deletions WordPress/proguard.cfg
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
-keepattributes **
# Used as a workaround for some Samsung devices on 4.2.2 - https://github.com/wordpress-mobile/WordPress-Android/issues/2151
-keep class !android.support.v7.view.menu.**,** {*;}
-dontpreverify
-dontoptimize
-dontshrink
-dontobfuscate

-keepclassmembers class ** {
public void onEvent*(**);
Expand Down
5 changes: 3 additions & 2 deletions WordPress/src/main/java/org/wordpress/android/WordPress.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import android.os.Bundle;
import android.os.StrictMode;
import android.os.SystemClock;
import android.support.multidex.MultiDexApplication;
import android.text.TextUtils;
import android.util.AndroidRuntimeException;
import android.webkit.WebSettings;
Expand Down Expand Up @@ -88,7 +89,7 @@
import de.greenrobot.event.EventBus;
import io.fabric.sdk.android.Fabric;

public class WordPress extends Application {
public class WordPress extends MultiDexApplication {
public static String versionName;
public static Blog currentBlog;
public static WordPressDB wpDB;
Expand All @@ -110,7 +111,7 @@ public class WordPress extends Application {
private static BitmapLruCache mBitmapCache;

/**
* Updates Options for the current blog in background.
* Updates Options for the current blog in background.
*/
public static RateLimitedTask sUpdateCurrentBlogOption = new RateLimitedTask(SECONDS_BETWEEN_OPTIONS_UPDATE) {
protected boolean run() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
import org.wordpress.android.util.ToastUtils.Duration;
import org.wordpress.android.util.UserEmailUtils;
import org.wordpress.android.widgets.WPTextView;
import org.wordpress.emailchecker.EmailChecker;
import org.wordpress.emailchecker2.EmailChecker;
import org.wordpress.persistentedittext.PersistentEditTextHelper;

import java.util.EnumSet;
Expand All @@ -57,16 +57,11 @@ public class NewUserFragment extends AbstractFragment implements TextWatcher {
private WPTextView mSignupButton;
private WPTextView mProgressTextSignIn;
private RelativeLayout mProgressBarSignIn;
private EmailChecker mEmailChecker;
private boolean mEmailAutoCorrected;
private boolean mAutoCompleteUrl;
private String mUsername;
private String mPassword;

public NewUserFragment() {
mEmailChecker = new EmailChecker();
}

public static NewUserFragment newInstance() {
return new NewUserFragment();
}
Expand Down Expand Up @@ -400,7 +395,7 @@ private void autocorrectEmail() {
return;
}
final String email = EditTextUtils.getText(mEmailTextField).trim();
String suggest = mEmailChecker.suggestDomainCorrection(email);
String suggest = EmailChecker.suggestDomainCorrection(email);
if (suggest.compareTo(email) != 0) {
mEmailAutoCorrected = true;
mEmailTextField.setText(suggest);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
import org.wordpress.android.util.ToastUtils;
import org.wordpress.android.util.WPUrlUtils;
import org.wordpress.android.widgets.WPTextView;
import org.wordpress.emailchecker.EmailChecker;
import org.wordpress.emailchecker2.EmailChecker;
import org.xmlrpc.android.ApiHelper;

import java.util.EnumSet;
Expand Down Expand Up @@ -117,13 +117,7 @@ public class SignInFragment extends AbstractFragment implements TextWatcher {
protected WPTextView mJetpackAuthLabel;
protected ImageView mInfoButton;
protected ImageView mInfoButtonSecondary;

protected final EmailChecker mEmailChecker;

public SignInFragment() {
mEmailChecker = new EmailChecker();
}


@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Expand Down Expand Up @@ -390,7 +384,7 @@ private void autocorrectUsername() {
return;
}
// It looks like an email address, then try to correct it
String suggest = mEmailChecker.suggestDomainCorrection(email);
String suggest = EmailChecker.suggestDomainCorrection(email);
if (suggest.compareTo(email) != 0) {
mEmailAutoCorrected = true;
mUsernameEditText.setText(suggest);
Expand Down
4 changes: 2 additions & 2 deletions libs/analytics/WordPressAnalytics/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ dependencies {
android {
publishNonDefault true

compileSdkVersion 23
buildToolsVersion "23.0.3"
compileSdkVersion 24
buildToolsVersion "24.0.0"

defaultConfig {
versionName "1.2.0"
Expand Down
4 changes: 2 additions & 2 deletions libs/editor/WordPressEditor/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ repositories {
android {
publishNonDefault true

compileSdkVersion 23
buildToolsVersion "23.0.3"
compileSdkVersion 24
buildToolsVersion "24.0.0"

defaultConfig {
versionCode 12
Expand Down
4 changes: 2 additions & 2 deletions libs/editor/example/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ repositories {
apply plugin: 'com.android.application'

android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
compileSdkVersion 24
buildToolsVersion "24.0.0"

defaultConfig {
applicationId "org.wordpress.editorexample"
Expand Down
4 changes: 2 additions & 2 deletions libs/networking/WordPressNetworking/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ apply plugin: 'maven'
android {
publishNonDefault true

compileSdkVersion 23
buildToolsVersion "23.0.3"
compileSdkVersion 24
buildToolsVersion "24.0.0"

defaultConfig {
minSdkVersion 14
Expand Down
4 changes: 2 additions & 2 deletions libs/utils/WordPressUtils/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ android {

publishNonDefault true

compileSdkVersion 23
buildToolsVersion "23.0.3"
compileSdkVersion 24
buildToolsVersion "24.0.0"

defaultConfig {
versionName "1.9.0"
Expand Down