From 72f92a4b861927c1ffdbcfd59ff585b0dd6b7e59 Mon Sep 17 00:00:00 2001 From: ChintanRathod Date: Tue, 11 Jun 2019 13:57:31 +0530 Subject: [PATCH 1/3] refactor: upgrade to new API versions - SDKVersion 27 to 28 - Update deprecated dependency "org.jetbrains.kotlin:kotlin-stdlib-jre7" - gradle plugin to 3.4.1 - gradle distribution to 5.1.1 --- build.gradle | 4 ++-- gradle/wrapper/gradle-wrapper.properties | 2 +- sample/build.gradle | 9 +++++---- sequencelayout/build.gradle | 4 ++-- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/build.gradle b/build.gradle index f1b0089..11502af 100644 --- a/build.gradle +++ b/build.gradle @@ -1,13 +1,13 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { - ext.kotlin_version = '1.2.31' + ext.kotlin_version = '1.3.10' repositories { google() jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:3.1.0' + classpath 'com.android.tools.build:gradle:3.4.1' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath 'com.github.dcendents:android-maven-gradle-plugin:2.0' diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 799eeeb..d1cdec1 100644 --- 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-4.6-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip diff --git a/sample/build.gradle b/sample/build.gradle index 641ccc2..7d0270f 100644 --- a/sample/build.gradle +++ b/sample/build.gradle @@ -3,11 +3,11 @@ apply plugin: 'kotlin-android' apply plugin: 'kotlin-android-extensions' android { - compileSdkVersion 27 + compileSdkVersion 28 defaultConfig { applicationId "com.transferwise.sequencelayout.sample" minSdkVersion 19 - targetSdkVersion 27 + targetSdkVersion 28 versionCode 1 versionName "1.0" } @@ -20,7 +20,8 @@ android { } dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version" - implementation 'com.android.support:appcompat-v7:27.1.0' implementation project(':sequencelayout') + + implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" + implementation 'com.android.support:appcompat-v7:27.1.0' } diff --git a/sequencelayout/build.gradle b/sequencelayout/build.gradle index eab69b2..5755e11 100644 --- a/sequencelayout/build.gradle +++ b/sequencelayout/build.gradle @@ -6,11 +6,11 @@ apply plugin: 'com.github.dcendents.android-maven' group='com.github.transferwise' android { - compileSdkVersion 27 + compileSdkVersion 28 defaultConfig { minSdkVersion 19 - targetSdkVersion 27 + targetSdkVersion 28 versionCode 7 versionName "1.0.7" archivesBaseName = "com.transferwise.sequencelayout-${versionName}" From 20116435479a767fdf4cd3b04e79f2323be18e88 Mon Sep 17 00:00:00 2001 From: ChintanRathod Date: Tue, 11 Jun 2019 14:14:55 +0530 Subject: [PATCH 2/3] fix: Migrated from Support to AndroidX - Replace older support dependencies with AndroidX - Simplify dependencies --- gradle.properties | 2 ++ sample/build.gradle | 2 +- .../com/transferwise/sequencelayout/sample/MainActivity.kt | 2 +- sample/src/main/res/layout/switch_item.xml | 2 +- sequencelayout/build.gradle | 2 +- .../java/com/transferwise/sequencelayout/SequenceLayout.kt | 4 ++-- .../java/com/transferwise/sequencelayout/SequenceStep.kt | 6 +++--- .../java/com/transferwise/sequencelayout/SequenceStepDot.kt | 2 +- 8 files changed, 12 insertions(+), 10 deletions(-) diff --git a/gradle.properties b/gradle.properties index aac7c9b..9e6fce1 100644 --- 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/sample/build.gradle b/sample/build.gradle index 7d0270f..9ffa55c 100644 --- a/sample/build.gradle +++ b/sample/build.gradle @@ -23,5 +23,5 @@ dependencies { implementation project(':sequencelayout') implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" - implementation 'com.android.support:appcompat-v7:27.1.0' + implementation 'androidx.appcompat:appcompat:1.0.2' } diff --git a/sample/src/main/java/com/transferwise/sequencelayout/sample/MainActivity.kt b/sample/src/main/java/com/transferwise/sequencelayout/sample/MainActivity.kt index 6a2d029..a2f881d 100644 --- a/sample/src/main/java/com/transferwise/sequencelayout/sample/MainActivity.kt +++ b/sample/src/main/java/com/transferwise/sequencelayout/sample/MainActivity.kt @@ -1,7 +1,7 @@ package com.transferwise.sequencelayout.sample import android.os.Bundle -import android.support.v7.app.AppCompatActivity +import androidx.appcompat.app.AppCompatActivity class MainActivity : AppCompatActivity() { diff --git a/sample/src/main/res/layout/switch_item.xml b/sample/src/main/res/layout/switch_item.xml index b1d4cd5..2abc0da 100644 --- a/sample/src/main/res/layout/switch_item.xml +++ b/sample/src/main/res/layout/switch_item.xml @@ -1,4 +1,4 @@ - Date: Fri, 12 Jul 2019 17:18:48 +0100 Subject: [PATCH 3/3] bump version --- sequencelayout/build.gradle | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sequencelayout/build.gradle b/sequencelayout/build.gradle index 8382a21..fbc0f54 100644 --- a/sequencelayout/build.gradle +++ b/sequencelayout/build.gradle @@ -11,8 +11,8 @@ android { defaultConfig { minSdkVersion 19 targetSdkVersion 28 - versionCode 7 - versionName "1.0.7" + versionCode 8 + versionName "1.0.8" archivesBaseName = "com.transferwise.sequencelayout-${versionName}" } @@ -27,4 +27,4 @@ android { dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" implementation 'androidx.appcompat:appcompat:1.0.2' -} \ No newline at end of file +}