From 3af8737b69291f8c7bf42607d78d1976f1060487 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Daniel=20Mart=C3=AD?= <mvdan@mvdan.cc>
Date: Sat, 12 Sep 2015 11:04:51 -0700
Subject: [PATCH] AnySoftKeyboard: clean up for future easier build

---
 .../com.menny.android.anysoftkeyboard.txt     |  27 +--
 .../gradle_cleanup_125.diff                   | 161 ------------------
 2 files changed, 5 insertions(+), 183 deletions(-)
 delete mode 100644 metadata/com.menny.android.anysoftkeyboard/gradle_cleanup_125.diff

diff --git a/metadata/com.menny.android.anysoftkeyboard.txt b/metadata/com.menny.android.anysoftkeyboard.txt
index 87e540f0cc..c42825c6ca 100644
--- a/metadata/com.menny.android.anysoftkeyboard.txt
+++ b/metadata/com.menny.android.anysoftkeyboard.txt
@@ -108,36 +108,19 @@ Build:20131101,114
         rm -rf libs/armeabi*/ libs/x86/ libs/mips/ ant/ keyboard_keystore StoreStuff/ res/raw/words_1.dict
     buildjni=yes
 
-Build:1.2.20140705,125
-    disable=won't build without words_1.dict binary
-    commit=v125
-    patch=gradle_cleanup_125.diff
+Build:1.2.20140705,140
+    disable=build words dict from source, no idea what version name/code it is
+    commit=1.5-r4.1
     gradle=yes
     rm=res/raw/words_1.dict
-    prebuild=sed -i -e 's/version utils\.Utils\..*$/version "1.2.20140705"/g' build.gradle
-    scandelete=buildSrc,src/main/jniLibs
-    build=rm -r buildSrc/build && \
-        mv temp_jni jni && \
-        sed -i 's/BUILD_STATIC_LIBRARY/BUILD_SHARED_LIBRARY/' jni/*/Android.mk && \
-        $$NDK$$/ndk-build && \
-        mv libs src/main/jniLibs
 
 Maintainer Notes:
-Patch gets rid of:
-* sonatype.org repo
-* testCompile stuff that we don't need and which would be pulled from sonatype
-* missing property files that would break the build
-* Usage of completely unnecessary plugins like idea and android-sdk-manager
-
-Stuff we have to take care of manually:
-* jni is in temp_jni for some reason
-* upstream clearly built src/main/jniLibs/*.so with BUILD_SHARED_LIBRARY
-* For some reason he put the binaries in src/main/jniLibs, so we have to move them
+* Remove third party repos since they're only needed for testCompile
 * "gradle clean" builds all the groovy stuff for some reason, so we have to clean up after it
 .
 
 Auto Update Mode:None
-Update Check Mode:Tags
+Update Check Mode:None
 Current Version:Unknown
 Current Version Code:140
 
diff --git a/metadata/com.menny.android.anysoftkeyboard/gradle_cleanup_125.diff b/metadata/com.menny.android.anysoftkeyboard/gradle_cleanup_125.diff
deleted file mode 100644
index 16e9aa7276..0000000000
--- a/metadata/com.menny.android.anysoftkeyboard/gradle_cleanup_125.diff
+++ /dev/null
@@ -1,161 +0,0 @@
-diff --git a/build.gradle b/build.gradle
-index 16fc717..e469c21 100644
---- a/build.gradle
-+++ b/build.gradle
-@@ -1,16 +1,10 @@
- buildscript {
-     repositories {
--        mavenLocal()
-         mavenCentral()
--        maven {
--            url 'https://oss.sonatype.org/content/repositories/snapshots/'
--        }
-     }
- 
-     dependencies {
-         classpath 'com.android.tools.build:gradle:0.11.+'
--        classpath 'org.robolectric:robolectric-gradle-plugin:0.11.+'
--        classpath 'com.jakewharton.sdkmanager:gradle-plugin:0.10.+'
-     }
- }
- 
-@@ -20,16 +14,11 @@ allprojects {
-     }
- }
- 
--apply plugin: 'android-sdk-manager'
- apply plugin: 'android'
--apply plugin: 'robolectric'
- 
- version utils.Utils.buildVersionName(1, 2, false)
- group 'net.evendanan'
- 
--def localproperties.LocalPropertiesFile localExtraProperties = new localproperties.LocalPropertiesFile(new File(projectDir, 'local.extra.properties'))
--def localproperties.LocalPropertiesFile localSigningProperties = new localproperties.LocalPropertiesFile(new File(projectDir, 'local.signing.properties'))
--
- android {
-     packagingOptions {
-         exclude 'LICENSE.txt'
-@@ -47,15 +36,8 @@ android {
- 
-         minSdkVersion 7
-         targetSdkVersion 19
--        //adding additional fields to the BuildConfig class.
--
--        //extra details - from local
--        def String support_email_address = localExtraProperties.getValueWithConsoleFallback('CRASH_REPORT_EMAIL', 'ooops@example.com', 'Support email address')
--        println 'crash report email is: '+support_email_address
- 
--        buildConfigField "String", "CRASH_REPORT_EMAIL_ADDRESS", '"'+support_email_address+'"'
--
--        testInstrumentationRunner "com.google.android.apps.common.testing.testrunner.GoogleInstrumentationTestRunner"
-+        buildConfigField "String", "CRASH_REPORT_EMAIL_ADDRESS", '""'
-     }
- 
-     compileOptions {
-@@ -63,34 +45,8 @@ android {
-         targetCompatibility JavaVersion.VERSION_1_7
-     }
- 
--    signingConfigs {
--        release {
--            def String keystore_file = localSigningProperties.getValueWithConsoleFallback('STORE_FILE', 'Key-Store file name')
--            def String keystore_password = localSigningProperties.getValueWithConsoleFallback('STORE_PASSWORD', 'Key-Store file password')
--            def String key_alias = localSigningProperties.getValueWithConsoleFallback('KEY_ALIAS', 'App key alias')
--            def String key_alias_password = localSigningProperties.getValueWithConsoleFallback('KEY_PASSWORD', 'App key password')
--
--            if (    utils.Utils.isEmpty(keystore_file) || utils.Utils.isEmpty(keystore_password) ||
--                    utils.Utils.isEmpty(key_alias) || utils.Utils.isEmpty(key_alias_password)) {
--                //missing signing details, so I'll use debug signingConfigs details.
--                println "Missing release build-type signing details, I'll use DEBUG signing for the release."
--                storeFile signingConfigs.debug.storeFile
--                storePassword signingConfigs.debug.storePassword
--                keyAlias signingConfigs.debug.keyAlias
--                keyPassword signingConfigs.debug.keyPassword
--            } else {
--                println 'For signing, will use key-store file '+keystore_file+', with key '+key_alias
--                storeFile file(keystore_file)
--                storePassword keystore_password
--                keyAlias key_alias
--                keyPassword key_alias_password
--            }
--        }
--    }
--
-     buildTypes {
-         release {
--            signingConfig signingConfigs.release
-             zipAlign true
- 
-             runProguard false
-@@ -98,7 +54,6 @@ android {
-         }
- 
-         debug {
--            signingConfig signingConfigs.release
-             zipAlign true
-             debuggable true
-         }
-@@ -108,26 +63,12 @@ android {
-             manifest.srcFile 'AndroidManifest.xml'
-             res.srcDirs = ['res']
-         }
--        robolectric {
--            setRoot('src/test')
--        }
-     }
- }
- 
--robolectric {
--    include '**/*Test.class'
--    exclude '**/espresso/**/*.class'
--
--    // configure max heap size of the test JVM
--    maxHeapSize = "2048m"
--}
--
- dependencies {
-     repositories {
-         mavenCentral()
--        maven {
--            url 'https://oss.sonatype.org/content/repositories/snapshots/'
--        }
-     }
-     compile 'net.evendanan.anysoftkeyboard:api:1.2.3@aar'
-     compile 'net.evendanan:frankenrobot:1.1.3@aar'
-@@ -135,35 +76,5 @@ dependencies {
-     compile 'com.android.support:appcompat-v7:19.+'
-     compile 'com.android.support:support-annotations:+'
-     compile 'com.google.code.gson:gson:2.2.+'
--    androidTestCompile 'junit:junit:4.11'
--
--    androidTestCompile('org.robolectric:robolectric:2.4-SNAPSHOT') {
--        exclude module: 'classworlds'
--        exclude module: 'maven-artifact'
--        exclude module: 'maven-artifact-manager'
--        exclude module: 'maven-error-diagnostics'
--        exclude module: 'maven-model'
--        exclude module: 'maven-plugin-registry'
--        exclude module: 'maven-profile'
--        exclude module: 'maven-project'
--        exclude module: 'maven-settings'
--        exclude module: 'nekohtml'
--        exclude module: 'plexus-container-default'
--        exclude module: 'plexus-interpolation'
--        exclude module: 'plexus-utils'
--        exclude module: 'wagon-file'
--        exclude module: 'wagon-http-lightweight'
--        exclude module: 'wagon-http-shared'
--        exclude module: 'wagon-provider-api'
--    }
--    androidTestCompile 'org.mockito:mockito-core:1.9.5'
--    androidTestCompile 'com.squareup:fest-android:1.0.+'
- }
- 
--apply plugin: 'idea'
--
--idea {
--    module {
--        testOutputDir = file('build/test-classes/debug')
--    }
--}