From 646f69e85d941e5a5c1f26af5c7589b2d1f4d16f Mon Sep 17 00:00:00 2001 From: Fatih Date: Thu, 6 Dec 2018 03:15:09 +0300 Subject: [PATCH] Support Older Apis + Migrate AndroidX + Upgrade CompileSDK --- README.md | 2 +- gradle.properties | 2 ++ library/build.gradle | 12 ++++++------ .../java/com/erkutaras/statelayout/StateLayout.kt | 2 +- sample/build.gradle | 8 ++++---- .../statelayout/sample/StateLayoutSampleActivity.kt | 2 +- .../main/res/layout/activity_state_layout_sample.xml | 4 ++-- 7 files changed, 17 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index d9610a3..d5e116d 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ allprojects { **Step 2.** Add the library dependency to your project build.gradle: ``` dependencies { - implementation 'com.github.erkutaras:StateLayout:1.1.2' + implementation 'com.github.erkutaras:StateLayout:1.1.3' } ``` diff --git a/gradle.properties b/gradle.properties index 743d692..8de5058 100644 --- a/gradle.properties +++ b/gradle.properties @@ -6,6 +6,8 @@ # http://www.gradle.org/docs/current/userguide/build_environment.html # 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. # This option should only be used with decoupled projects. More details, visit diff --git a/library/build.gradle b/library/build.gradle index 9345b58..a5cc9af 100644 --- a/library/build.gradle +++ b/library/build.gradle @@ -5,13 +5,13 @@ apply plugin: 'com.github.dcendents.android-maven' group='com.erkutaras.statelayout' android { - compileSdkVersion 27 + compileSdkVersion 28 defaultConfig { - minSdkVersion 17 - targetSdkVersion 27 - versionCode 13 - versionName "1.1.2" + minSdkVersion 14 + targetSdkVersion 28 + versionCode 14 + versionName "1.1.3" vectorDrawables.useSupportLibrary = true } @@ -27,7 +27,7 @@ android { dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) - implementation 'com.android.support:appcompat-v7:27.1.1' + implementation 'androidx.appcompat:appcompat:1.0.2' implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" } repositories { diff --git a/library/src/main/java/com/erkutaras/statelayout/StateLayout.kt b/library/src/main/java/com/erkutaras/statelayout/StateLayout.kt index c3f97c2..effc035 100644 --- a/library/src/main/java/com/erkutaras/statelayout/StateLayout.kt +++ b/library/src/main/java/com/erkutaras/statelayout/StateLayout.kt @@ -1,7 +1,7 @@ package com.erkutaras.statelayout import android.content.Context -import android.support.annotation.LayoutRes +import androidx.annotation.LayoutRes import android.util.AttributeSet import android.view.LayoutInflater import android.view.View diff --git a/sample/build.gradle b/sample/build.gradle index 97483a6..6e8aa65 100644 --- a/sample/build.gradle +++ b/sample/build.gradle @@ -8,11 +8,11 @@ android { compileSdkVersion 28 defaultConfig { applicationId "com.erkutaras.statelayout.sample" - minSdkVersion 17 + minSdkVersion 14 targetSdkVersion 28 versionCode 1 versionName "1.0" - testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } buildTypes { release { @@ -26,6 +26,6 @@ dependencies { implementation project(':library') implementation fileTree(include: ['*.jar'], dir: 'libs') implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" - implementation 'com.android.support:appcompat-v7:28.0.0' - implementation 'com.android.support.constraint:constraint-layout:1.1.3' + implementation 'androidx.appcompat:appcompat:1.0.2' + implementation 'androidx.constraintlayout:constraintlayout:1.1.3' } diff --git a/sample/src/main/java/com/erkutaras/statelayout/sample/StateLayoutSampleActivity.kt b/sample/src/main/java/com/erkutaras/statelayout/sample/StateLayoutSampleActivity.kt index d48e216..d73ee65 100644 --- a/sample/src/main/java/com/erkutaras/statelayout/sample/StateLayoutSampleActivity.kt +++ b/sample/src/main/java/com/erkutaras/statelayout/sample/StateLayoutSampleActivity.kt @@ -2,7 +2,7 @@ package com.erkutaras.statelayout.sample import android.graphics.Bitmap import android.os.Bundle -import android.support.v7.app.AppCompatActivity +import androidx.appcompat.app.AppCompatActivity import android.webkit.WebResourceError import android.webkit.WebResourceRequest import android.webkit.WebView diff --git a/sample/src/main/res/layout/activity_state_layout_sample.xml b/sample/src/main/res/layout/activity_state_layout_sample.xml index 185d21d..dede98d 100644 --- a/sample/src/main/res/layout/activity_state_layout_sample.xml +++ b/sample/src/main/res/layout/activity_state_layout_sample.xml @@ -1,5 +1,5 @@ - - \ No newline at end of file + \ No newline at end of file