From c793d84b6f3f9d3b67ab581dd322625c922983cf Mon Sep 17 00:00:00 2001 From: Efra Espada Date: Tue, 1 Sep 2020 19:29:57 +0200 Subject: [PATCH 1/3] gradle update --- app/build.gradle | 7 +++---- build.gradle | 4 ++-- gradle/wrapper/gradle-wrapper.properties | 2 +- library/build.gradle | 1 + 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 8f2406b..6df4d5d 100755 --- a/app/build.gradle +++ b/app/build.gradle @@ -14,13 +14,12 @@ android { signingConfigs { } - compileSdkVersion 28 - buildToolsVersion '28.0.3' + compileSdkVersion 29 defaultConfig { applicationId "com.efraespada.stringobfuscator" minSdkVersion 15 - targetSdkVersion 28 + targetSdkVersion 29 versionCode 1 versionName "1.0" } @@ -61,7 +60,7 @@ dependencies { androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', { exclude group: 'com.android.support', module: 'support-annotations' }) - implementation 'com.android.support:appcompat-v7:28.0.0' + implementation 'com.android.support:appcompat-v7:29.0.0' testImplementation 'junit:junit:4.12' implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" implementation 'commons-io:commons-io:2.5' diff --git a/build.gradle b/build.gradle index bb570e8..158b52e 100755 --- a/build.gradle +++ b/build.gradle @@ -1,6 +1,6 @@ buildscript { - ext.kotlin_version = '1.3.50' + ext.kotlin_version = '1.4.0' ext { stringcare_version = '4.0.0' @@ -18,7 +18,7 @@ buildscript { dependencies { classpath "com.stringcare:plugin:$stringcare_version" // classpath files('../KotlinGradlePlugin/build/libs/plugin-4.0.0.jar') - classpath 'com.android.tools.build:gradle:3.5.3' + classpath 'com.android.tools.build:gradle:4.0.1' classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.1" classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index c82546e..2ad3d9d 100755 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.5-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.4.1-all.zip diff --git a/library/build.gradle b/library/build.gradle index 34f3888..245bc96 100755 --- a/library/build.gradle +++ b/library/build.gradle @@ -38,6 +38,7 @@ android { path "CMakeLists.txt" } } + ndkVersion '21.3.6528147' } dependencies { From 6fb8987760bd21e3f2480222e95a76d400015fca Mon Sep 17 00:00:00 2001 From: Efra Espada Date: Tue, 1 Sep 2020 19:44:08 +0200 Subject: [PATCH 2/3] migrated to androidX components --- app/build.gradle | 8 ++++---- .../stringobfuscator/ExampleInstrumentedTest.java | 4 ++-- .../com/efraespada/stringobfuscator/MainActivity.java | 2 +- build.gradle | 4 ++-- gradle.properties | 2 ++ library/build.gradle | 11 +++++------ .../stringcarelibrary/ExampleInstrumentedTest.java | 4 ++-- .../main/java/com/stringcare/library/CPlusLogic.kt | 2 +- .../src/main/java/com/stringcare/library/JavaLogic.kt | 2 +- library/src/main/java/com/stringcare/library/SC.kt | 2 +- .../main/java/com/stringcare/library/SCTextView.java | 2 +- 11 files changed, 22 insertions(+), 21 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 6df4d5d..3ecd2fd 100755 --- a/app/build.gradle +++ b/app/build.gradle @@ -14,12 +14,12 @@ android { signingConfigs { } - compileSdkVersion 29 + compileSdkVersion 30 defaultConfig { applicationId "com.efraespada.stringobfuscator" minSdkVersion 15 - targetSdkVersion 29 + targetSdkVersion 30 versionCode 1 versionName "1.0" } @@ -57,10 +57,10 @@ repositories { dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') - androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', { + androidTestImplementation('androidx.test.espresso:espresso-core:3.1.0', { exclude group: 'com.android.support', module: 'support-annotations' }) - implementation 'com.android.support:appcompat-v7:29.0.0' + implementation 'androidx.appcompat:appcompat:1.2.0' testImplementation 'junit:junit:4.12' implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" implementation 'commons-io:commons-io:2.5' diff --git a/app/src/androidTest/java/com/efraespada/stringobfuscator/ExampleInstrumentedTest.java b/app/src/androidTest/java/com/efraespada/stringobfuscator/ExampleInstrumentedTest.java index 0dce426..5084265 100755 --- a/app/src/androidTest/java/com/efraespada/stringobfuscator/ExampleInstrumentedTest.java +++ b/app/src/androidTest/java/com/efraespada/stringobfuscator/ExampleInstrumentedTest.java @@ -1,8 +1,8 @@ package com.efraespada.stringobfuscator; import android.content.Context; -import android.support.test.InstrumentationRegistry; -import android.support.test.runner.AndroidJUnit4; +import androidx.test.platform.app.InstrumentationRegistry; +import androidx.test.ext.junit.runners.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; diff --git a/app/src/main/java/com/efraespada/stringobfuscator/MainActivity.java b/app/src/main/java/com/efraespada/stringobfuscator/MainActivity.java index cfb0e6c..61e8ffa 100755 --- a/app/src/main/java/com/efraespada/stringobfuscator/MainActivity.java +++ b/app/src/main/java/com/efraespada/stringobfuscator/MainActivity.java @@ -1,7 +1,7 @@ package com.efraespada.stringobfuscator; import android.os.Bundle; -import android.support.v7.app.AppCompatActivity; +import androidx.appcompat.app.AppCompatActivity; import android.widget.TextView; import com.stringcare.library.SC; diff --git a/build.gradle b/build.gradle index 158b52e..94e3b37 100755 --- a/build.gradle +++ b/build.gradle @@ -16,8 +16,8 @@ buildscript { } dependencies { - classpath "com.stringcare:plugin:$stringcare_version" - // classpath files('../KotlinGradlePlugin/build/libs/plugin-4.0.0.jar') + // classpath "com.stringcare:plugin:$stringcare_version" + classpath files('../KotlinGradlePlugin/build/libs/plugin-4.0.0.jar') classpath 'com.android.tools.build:gradle:4.0.1' classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.1" classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1' diff --git a/gradle.properties b/gradle.properties index 65f4517..c1ff507 100755 --- a/gradle.properties +++ b/gradle.properties @@ -9,6 +9,8 @@ # Specifies the JVM arguments used for the daemon process. # The setting is particularly useful for tweaking memory settings. +android.enableJetifier=true +android.useAndroidX=true org.gradle.jvmargs=-Xmx1536m # When configured, Gradle will run in incubating parallel mode. diff --git a/library/build.gradle b/library/build.gradle index 245bc96..bce4c8d 100755 --- a/library/build.gradle +++ b/library/build.gradle @@ -7,15 +7,14 @@ apply plugin: 'com.jfrog.bintray' version = "4.0.0" android { - compileSdkVersion 28 - buildToolsVersion '28.0.3' + compileSdkVersion 30 defaultConfig { minSdkVersion 15 - targetSdkVersion 28 + targetSdkVersion 30 versionCode 4 versionName version - testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" + testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' externalNativeBuild { cmake { cppFlags "-fexceptions" @@ -43,10 +42,10 @@ android { dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) - androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', { + androidTestImplementation('androidx.test.espresso:espresso-core:3.1.0', { exclude group: 'com.android.support', module: 'support-annotations' }) - implementation 'com.android.support:appcompat-v7:28.0.0' + implementation 'androidx.appcompat:appcompat:1.2.0' implementation 'org.jetbrains.anko:anko:0.10.8' implementation 'org.apache.commons:commons-lang3:3.9' testImplementation 'junit:junit:4.12' diff --git a/library/src/androidTest/java/com/efraespada/stringcarelibrary/ExampleInstrumentedTest.java b/library/src/androidTest/java/com/efraespada/stringcarelibrary/ExampleInstrumentedTest.java index c250e91..6bbc527 100755 --- a/library/src/androidTest/java/com/efraespada/stringcarelibrary/ExampleInstrumentedTest.java +++ b/library/src/androidTest/java/com/efraespada/stringcarelibrary/ExampleInstrumentedTest.java @@ -1,8 +1,8 @@ package com.efraespada.stringcarelibrary; import android.content.Context; -import android.support.test.InstrumentationRegistry; -import android.support.test.runner.AndroidJUnit4; +import androidx.test.platform.app.InstrumentationRegistry; +import androidx.test.ext.junit.runners.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; diff --git a/library/src/main/java/com/stringcare/library/CPlusLogic.kt b/library/src/main/java/com/stringcare/library/CPlusLogic.kt index 8cdba29..f8fb88e 100644 --- a/library/src/main/java/com/stringcare/library/CPlusLogic.kt +++ b/library/src/main/java/com/stringcare/library/CPlusLogic.kt @@ -2,7 +2,7 @@ package com.stringcare.library import android.content.Context import android.content.res.Resources -import android.support.annotation.StringRes +import androidx.annotation.StringRes import java.nio.charset.Charset import kotlin.Exception diff --git a/library/src/main/java/com/stringcare/library/JavaLogic.kt b/library/src/main/java/com/stringcare/library/JavaLogic.kt index 74b8cdf..1e163f0 100644 --- a/library/src/main/java/com/stringcare/library/JavaLogic.kt +++ b/library/src/main/java/com/stringcare/library/JavaLogic.kt @@ -2,7 +2,7 @@ package com.stringcare.library import android.content.Context import android.content.res.Resources -import android.support.annotation.StringRes +import androidx.annotation.StringRes import java.nio.charset.Charset import javax.crypto.Cipher import javax.crypto.spec.SecretKeySpec diff --git a/library/src/main/java/com/stringcare/library/SC.kt b/library/src/main/java/com/stringcare/library/SC.kt index d9e8c18..6d4f7c9 100755 --- a/library/src/main/java/com/stringcare/library/SC.kt +++ b/library/src/main/java/com/stringcare/library/SC.kt @@ -1,7 +1,7 @@ package com.stringcare.library import android.content.Context -import android.support.annotation.StringRes +import androidx.annotation.StringRes import android.util.Log import org.jetbrains.anko.doAsync import org.json.JSONArray diff --git a/library/src/main/java/com/stringcare/library/SCTextView.java b/library/src/main/java/com/stringcare/library/SCTextView.java index 8f845ee..59bd45c 100644 --- a/library/src/main/java/com/stringcare/library/SCTextView.java +++ b/library/src/main/java/com/stringcare/library/SCTextView.java @@ -1,7 +1,7 @@ package com.stringcare.library; import android.content.Context; -import android.support.v7.widget.AppCompatTextView; +import androidx.appcompat.widget.AppCompatTextView; import android.text.Html; import android.util.AttributeSet; From cf08c2bda4710ee3d0070895ff0bf2d2017986e6 Mon Sep 17 00:00:00 2001 From: Efra Espada Date: Wed, 2 Sep 2020 10:08:10 +0200 Subject: [PATCH 3/3] v4.0.1 --- app/build.gradle | 4 ++++ .../com/efraespada/stringobfuscator/MainActivity.java | 4 +++- build.gradle | 9 +++++---- library/build.gradle | 2 +- 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 3ecd2fd..fb671a9 100755 --- a/app/build.gradle +++ b/app/build.gradle @@ -48,6 +48,10 @@ android { sourceCompatibility 1.8 targetCompatibility 1.8 } + + aaptOptions { + noCompress "json" + } } repositories { diff --git a/app/src/main/java/com/efraespada/stringobfuscator/MainActivity.java b/app/src/main/java/com/efraespada/stringobfuscator/MainActivity.java index 61e8ffa..9bd4f34 100755 --- a/app/src/main/java/com/efraespada/stringobfuscator/MainActivity.java +++ b/app/src/main/java/com/efraespada/stringobfuscator/MainActivity.java @@ -44,7 +44,9 @@ protected void onCreate(Bundle savedInstanceState) { ((TextView) findViewById(R.id.same_value)).setText(areEquals); String jsonObjectName = SC.reveal(R.string.asset_json_file); - SC.asset().asyncJson(jsonObjectName, json -> ((TextView) findViewById(R.id.json_object)).setText(json.toString())); + SC.asset().asyncJson(jsonObjectName, json -> + ((TextView) findViewById(R.id.json_object)).setText(json.toString()) + ); SC.asset().asyncBytes(jsonObjectName, bytes -> ((TextView) findViewById(R.id.json_object_original)).setText(new String(bytes)), false); String jsonArrayName = SC.reveal(R.string.asset_json_raw_file); diff --git a/build.gradle b/build.gradle index 94e3b37..64baf2e 100755 --- a/build.gradle +++ b/build.gradle @@ -3,7 +3,7 @@ buildscript { ext.kotlin_version = '1.4.0' ext { - stringcare_version = '4.0.0' + stringcare_version = '4.0.1' } repositories { @@ -16,13 +16,14 @@ buildscript { } dependencies { - // classpath "com.stringcare:plugin:$stringcare_version" - classpath files('../KotlinGradlePlugin/build/libs/plugin-4.0.0.jar') + classpath "com.stringcare:plugin:$stringcare_version" + // classpath files('../KotlinGradlePlugin/build/libs/plugin-4.0.0.jar') classpath 'com.android.tools.build:gradle:4.0.1' - classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.1" + classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.5" classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } + } allprojects { diff --git a/library/build.gradle b/library/build.gradle index bce4c8d..1dfdcc5 100755 --- a/library/build.gradle +++ b/library/build.gradle @@ -4,7 +4,7 @@ apply plugin: 'kotlin-android-extensions' apply plugin: 'com.github.dcendents.android-maven' apply plugin: 'com.jfrog.bintray' -version = "4.0.0" +version = "4.0.1" android { compileSdkVersion 30