From a2c5e3b3a44cf658b4a43b860cf3d5c912ce3555 Mon Sep 17 00:00:00 2001 From: Mariotaku Lee Date: Sun, 22 Nov 2015 22:55:29 +0800 Subject: [PATCH] trying to solve CI errors --- .travis.yml | 2 +- build.gradle | 98 +++++++++++++++++++ global.gradle | 38 ------- signing.gradle | 97 ------------------ twidere.component.common/build.gradle | 1 - twidere.component.nyan/build.gradle | 1 - twidere.donate.nyanwp.wear/build.gradle | 2 - twidere.donate.nyanwp/build.gradle | 2 - .../build.gradle | 1 - twidere.extension.push.xiaomi/build.gradle | 2 - twidere.extension.shortener.gist/build.gradle | 2 - twidere.extension.twitlonger/build.gradle | 4 +- twidere.library.extension/build.gradle | 1 - twidere.wear/build.gradle | 5 +- twidere/build.gradle | 4 +- .../src/main/res/layout/activity_compose.xml | 2 +- 16 files changed, 104 insertions(+), 158 deletions(-) delete mode 100644 global.gradle delete mode 100644 signing.gradle diff --git a/.travis.yml b/.travis.yml index eadee5a1a..c03a47a67 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,7 +24,7 @@ android: jdk: - oraclejdk7 -sudo: required +sudo: false env: global: diff --git a/build.gradle b/build.gradle index 572bc0729..1df3ae7c3 100644 --- a/build.gradle +++ b/build.gradle @@ -25,4 +25,102 @@ allprojects { maven { url 'https://jitpack.io' } } +} + +subprojects { + + plugins.withId('com.android.library') { + android { + compileSdkVersion 23 + buildToolsVersion '23.0.1' + + lintOptions { + abortOnError false + lintConfig rootProject.file('lint.xml') + } + + packagingOptions { + exclude 'META-INF/DEPENDENCIES' + exclude 'META-INF/LICENSE' + exclude 'META-INF/LICENSE.txt' + exclude 'META-INF/license.txt' + exclude 'META-INF/NOTICE' + exclude 'META-INF/NOTICE.txt' + exclude 'META-INF/notice.txt' + exclude 'META-INF/ASL2.0' + } + } + } + + plugins.withId('com.android.application') { + + android { + compileSdkVersion 23 + buildToolsVersion '23.0.1' + + lintOptions { + abortOnError false + lintConfig rootProject.file('lint.xml') + } + + signingConfigs { + debug { + File signingPropFile = rootProject.file('signing.properties') + if (signingPropFile.exists()) { + Properties signingProp = new Properties() + signingProp.load(signingPropFile.newDataInputStream()) + storeFile file(signingProp.get("debug.storeFile")) + storePassword signingProp.get("debug.storePassword") + keyAlias signingProp.get("debug.keyAlias") + keyPassword signingProp.get("debug.keyPassword") + } else if (System.getenv('DEBUG_KEYSTORE_BASE64') != null) { + storeFile decodeKeyStoreFileFromBase64Env('DEBUG_KEYSTORE_BASE64') + storePassword System.getenv('DEBUG_KEYSTORE_PASSWORD') + keyAlias System.getenv('DEBUG_KEYSTORE_KEY_ALIAS') + keyPassword System.getenv('DEBUG_KEYSTORE_KEY_PASSWORD') + } + } + release { + File signingPropFile = rootProject.file('signing.properties') + if (signingPropFile.exists()) { + Properties signingProp = new Properties() + signingProp.load(signingPropFile.newDataInputStream()) + storeFile file(signingProp.get("release.storeFile")) + storePassword signingProp.get("release.storePassword") + keyAlias signingProp.get("release.keyAlias") + keyPassword signingProp.get("release.keyPassword") + } else if (System.getenv('RELEASE_KEYSTORE_BASE64') != null) { + storeFile decodeKeyStoreFileFromBase64Env('RELEASE_KEYSTORE_BASE64') + storePassword System.getenv('RELEASE_KEYSTORE_PASSWORD') + keyAlias System.getenv('RELEASE_KEYSTORE_KEY_ALIAS') + keyPassword System.getenv('RELEASE_KEYSTORE_KEY_PASSWORD') + } + } + } + buildTypes { + debug { + if (rootProject.file('signing.properties').exists() + || System.getenv('DEBUG_KEYSTORE_BASE64') != null) { + signingConfig signingConfigs.debug + } + } + release { + if (rootProject.file('signing.properties').exists() + || System.getenv('RELEASE_KEYSTORE_BASE64') != null) { + signingConfig signingConfigs.release + } + } + } + packagingOptions { + exclude 'META-INF/DEPENDENCIES' + exclude 'META-INF/LICENSE' + exclude 'META-INF/LICENSE.txt' + exclude 'META-INF/license.txt' + exclude 'META-INF/NOTICE' + exclude 'META-INF/NOTICE.txt' + exclude 'META-INF/notice.txt' + exclude 'META-INF/ASL2.0' + } + } + } } \ No newline at end of file diff --git a/global.gradle b/global.gradle deleted file mode 100644 index cbe7c4d80..000000000 --- a/global.gradle +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Twidere - Twitter client for Android - * - * Copyright (C) 2012-2015 Mariotaku Lee - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -android { - compileSdkVersion 23 - buildToolsVersion '23.0.1' - - lintOptions { - abortOnError false - lintConfig rootProject.file('lint.xml') - } - - packagingOptions { - exclude 'META-INF/DEPENDENCIES' - exclude 'META-INF/LICENSE' - exclude 'META-INF/LICENSE.txt' - exclude 'META-INF/license.txt' - exclude 'META-INF/NOTICE' - exclude 'META-INF/NOTICE.txt' - exclude 'META-INF/notice.txt' - exclude 'META-INF/ASL2.0' - } -} \ No newline at end of file diff --git a/signing.gradle b/signing.gradle deleted file mode 100644 index d701195a6..000000000 --- a/signing.gradle +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Twidere - Twitter client for Android - * - * Copyright (C) 2012-2015 Mariotaku Lee - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -apply plugin: 'com.android.application' - -/** - * Gradle script for signing applications - * Just apply this script to your application build.gradle file. - * DON'T FORGET TO IGNORE signing.properties FROM YOUR VERSION CONTROL!!! - * - * @author Mariotaku Lee - */ - -android { - - signingConfigs { - debug { - File signingPropFile = rootProject.file('signing.properties') - if (signingPropFile.exists()) { - Properties signingProp = new Properties() - signingProp.load(signingPropFile.newDataInputStream()) - storeFile file(signingProp.get("debug.storeFile")) - storePassword signingProp.get("debug.storePassword") - keyAlias signingProp.get("debug.keyAlias") - keyPassword signingProp.get("debug.keyPassword") - } else if (System.getenv('DEBUG_KEYSTORE_BASE64') != null) { - storeFile decodeKeyStoreFileFromBase64Env('DEBUG_KEYSTORE_BASE64') - storePassword System.getenv('DEBUG_KEYSTORE_PASSWORD') - keyAlias System.getenv('DEBUG_KEYSTORE_KEY_ALIAS') - keyPassword System.getenv('DEBUG_KEYSTORE_KEY_PASSWORD') - } - } - release { - File signingPropFile = rootProject.file('signing.properties') - if (signingPropFile.exists()) { - Properties signingProp = new Properties() - signingProp.load(signingPropFile.newDataInputStream()) - storeFile file(signingProp.get("release.storeFile")) - storePassword signingProp.get("release.storePassword") - keyAlias signingProp.get("release.keyAlias") - keyPassword signingProp.get("release.keyPassword") - } else if (System.getenv('RELEASE_KEYSTORE_BASE64') != null) { - storeFile decodeKeyStoreFileFromBase64Env('RELEASE_KEYSTORE_BASE64') - storePassword System.getenv('RELEASE_KEYSTORE_PASSWORD') - keyAlias System.getenv('RELEASE_KEYSTORE_KEY_ALIAS') - keyPassword System.getenv('RELEASE_KEYSTORE_KEY_PASSWORD') - } - } - } - buildTypes { - debug { - if (rootProject.file('signing.properties').exists() - || System.getenv('DEBUG_KEYSTORE_BASE64') != null) { - signingConfig signingConfigs.debug - } - } - release { - if (rootProject.file('signing.properties').exists() - || System.getenv('RELEASE_KEYSTORE_BASE64') != null) { - signingConfig signingConfigs.release - } - } - } - -} - -def decodeKeyStoreFileFromBase64Env(String name) { - String keyStoreBase64 = System.getenv(name) - if (keyStoreBase64 == null) return null - File tempKeyStoreFile = File.createTempFile("tmp_ks_", ".jks", File.createTempDir()) - FileOutputStream fos = null - try { - fos = new FileOutputStream(tempKeyStoreFile) - fos.write(keyStoreBase64.decodeBase64()) - fos.flush() - } finally { - if (fos != null) { - fos.close() - } - } - return tempKeyStoreFile -} diff --git a/twidere.component.common/build.gradle b/twidere.component.common/build.gradle index 86b7c1de6..85518438c 100644 --- a/twidere.component.common/build.gradle +++ b/twidere.component.common/build.gradle @@ -19,7 +19,6 @@ apply plugin: 'com.android.library' apply plugin: 'com.neenbedankt.android-apt' -apply from: rootProject.file('global.gradle') android { defaultConfig { diff --git a/twidere.component.nyan/build.gradle b/twidere.component.nyan/build.gradle index 5c9762bb6..0c7a2a63e 100644 --- a/twidere.component.nyan/build.gradle +++ b/twidere.component.nyan/build.gradle @@ -18,7 +18,6 @@ */ apply plugin: 'com.android.library' -apply from: rootProject.file('global.gradle') android { defaultConfig { diff --git a/twidere.donate.nyanwp.wear/build.gradle b/twidere.donate.nyanwp.wear/build.gradle index 1c6246772..e4fb692a8 100644 --- a/twidere.donate.nyanwp.wear/build.gradle +++ b/twidere.donate.nyanwp.wear/build.gradle @@ -18,8 +18,6 @@ */ apply plugin: 'com.android.application' -apply from: rootProject.file('global.gradle') -apply from: rootProject.file('signing.gradle') android { defaultConfig { diff --git a/twidere.donate.nyanwp/build.gradle b/twidere.donate.nyanwp/build.gradle index ded9e0458..423031de0 100644 --- a/twidere.donate.nyanwp/build.gradle +++ b/twidere.donate.nyanwp/build.gradle @@ -18,8 +18,6 @@ */ apply plugin: 'com.android.application' -apply from: rootProject.file('global.gradle') -apply from: rootProject.file('signing.gradle') android { defaultConfig { diff --git a/twidere.extension.launcher.compose/build.gradle b/twidere.extension.launcher.compose/build.gradle index 664845978..928040fd1 100644 --- a/twidere.extension.launcher.compose/build.gradle +++ b/twidere.extension.launcher.compose/build.gradle @@ -18,7 +18,6 @@ */ apply plugin: 'com.android.application' -apply from: rootProject.file('global.gradle') android { defaultConfig { diff --git a/twidere.extension.push.xiaomi/build.gradle b/twidere.extension.push.xiaomi/build.gradle index 7925640c4..f2ae6c348 100644 --- a/twidere.extension.push.xiaomi/build.gradle +++ b/twidere.extension.push.xiaomi/build.gradle @@ -18,8 +18,6 @@ */ apply plugin: 'com.android.application' -apply from: rootProject.file('global.gradle') -apply from: rootProject.file('signing.gradle') android { defaultConfig { diff --git a/twidere.extension.shortener.gist/build.gradle b/twidere.extension.shortener.gist/build.gradle index 5f9c326e4..2370be271 100644 --- a/twidere.extension.shortener.gist/build.gradle +++ b/twidere.extension.shortener.gist/build.gradle @@ -19,8 +19,6 @@ apply plugin: 'com.android.application' apply plugin: 'com.neenbedankt.android-apt' -apply from: rootProject.file('global.gradle') -apply from: rootProject.file('signing.gradle') android { diff --git a/twidere.extension.twitlonger/build.gradle b/twidere.extension.twitlonger/build.gradle index 8caa35224..3fce07d03 100644 --- a/twidere.extension.twitlonger/build.gradle +++ b/twidere.extension.twitlonger/build.gradle @@ -18,14 +18,12 @@ */ apply plugin: 'com.android.application' -apply from: rootProject.file('global.gradle') -apply from: rootProject.file('signing.gradle') android { defaultConfig { applicationId "org.mariotaku.extension.twitlonger" minSdkVersion 14 - targetSdkVersion 22 + targetSdkVersion 23 versionCode 6 versionName "1.5" } diff --git a/twidere.library.extension/build.gradle b/twidere.library.extension/build.gradle index 2e2a4b142..4295c7816 100644 --- a/twidere.library.extension/build.gradle +++ b/twidere.library.extension/build.gradle @@ -18,7 +18,6 @@ */ apply plugin: 'com.android.library' -apply from: rootProject.file('global.gradle') android { defaultConfig { diff --git a/twidere.wear/build.gradle b/twidere.wear/build.gradle index bdb9c106a..9ab1a0237 100644 --- a/twidere.wear/build.gradle +++ b/twidere.wear/build.gradle @@ -19,9 +19,6 @@ apply plugin: 'com.android.application' -apply from: rootProject.file('global.gradle') -apply from: rootProject.file('signing.gradle') - android { defaultConfig { applicationId "org.mariotaku.twidere" @@ -42,5 +39,5 @@ android { dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) compile 'com.google.android.support:wearable:1.3.0' - compile 'com.google.android.gms:play-services-wearable:8.1.0' + compile 'com.google.android.gms:play-services-wearable:8.3.0' } diff --git a/twidere/build.gradle b/twidere/build.gradle index 9bbea6651..66f574a7b 100644 --- a/twidere/build.gradle +++ b/twidere/build.gradle @@ -5,8 +5,6 @@ import java.text.SimpleDateFormat apply plugin: 'com.android.application' apply plugin: 'com.neenbedankt.android-apt' apply plugin: 'androidsvgdrawable' -apply from: rootProject.file('global.gradle') -apply from: rootProject.file('signing.gradle') android { @@ -34,6 +32,8 @@ android { versionNameSuffix String.format(" (dev %s)", format.format(new Date())) } release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd") versionNameSuffix String.format(" (dev %s)", format.format(new Date())) } diff --git a/twidere/src/main/res/layout/activity_compose.xml b/twidere/src/main/res/layout/activity_compose.xml index 10ee903c6..da1ebb1d8 100644 --- a/twidere/src/main/res/layout/activity_compose.xml +++ b/twidere/src/main/res/layout/activity_compose.xml @@ -60,7 +60,7 @@ android:background="@null" android:gravity="top" android:hint="@string/status_hint" - android:inputType="textMultiLine|textShortMessage" + android:inputType="textMultiLine|textLongMessage" android:minLines="6" android:padding="@dimen/element_spacing_normal" android:scrollbars="vertical"