From 1f38834f1aace1c3461841e9ec48907bbdbc601a Mon Sep 17 00:00:00 2001 From: Dan Lew Date: Fri, 8 May 2020 15:06:47 -0500 Subject: [PATCH] Update sample for latest Victor release --- .travis.yml | 4 ++-- build.gradle | 2 +- gradle.properties | 4 +++- sample/build.gradle | 9 +++++++-- .../main/java/com/trello/victorsample/MainActivity.java | 5 +++-- settings.gradle | 5 +---- 6 files changed, 17 insertions(+), 12 deletions(-) diff --git a/.travis.yml b/.travis.yml index d5f98a9..2c26161 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,8 +4,8 @@ android: components: - tools - platform-tools - - build-tools-27.0.3 - - android-25 + - build-tools-28.0.3 + - android-29 - extra-android-m2repository jdk: oraclejdk8 diff --git a/build.gradle b/build.gradle index 173bddb..a972123 100644 --- a/build.gradle +++ b/build.gradle @@ -20,7 +20,7 @@ buildscript { google() } dependencies { - classpath 'com.android.tools.build:gradle:3.6.2' + classpath 'com.android.tools.build:gradle:3.6.3' } } diff --git a/gradle.properties b/gradle.properties index 1d3591c..e3164b5 100644 --- a/gradle.properties +++ b/gradle.properties @@ -15,4 +15,6 @@ # When configured, Gradle will run in incubating parallel mode. # This option should only be used with decoupled projects. More details, visit # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects -# org.gradle.parallel=true \ No newline at end of file +# org.gradle.parallel=true + +android.useAndroidX=true \ No newline at end of file diff --git a/sample/build.gradle b/sample/build.gradle index 1e939da..59d322d 100644 --- a/sample/build.gradle +++ b/sample/build.gradle @@ -19,7 +19,7 @@ buildscript { jcenter() } dependencies { - classpath 'com.trello:victor:1.0.0' + classpath 'com.trello:victor:1.1.0' } } @@ -42,6 +42,11 @@ android { vectorDrawables.useSupportLibrary = true } + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + // Define the 'svg' source set for any flavors/build types and/or 'main' for all of them sourceSets { main { @@ -68,5 +73,5 @@ repositories { } dependencies { - implementation 'com.android.support:appcompat-v7:25.4.0' + implementation 'androidx.appcompat:appcompat:1.1.0' } diff --git a/sample/src/main/java/com/trello/victorsample/MainActivity.java b/sample/src/main/java/com/trello/victorsample/MainActivity.java index 0ad74b7..e15d5b8 100644 --- a/sample/src/main/java/com/trello/victorsample/MainActivity.java +++ b/sample/src/main/java/com/trello/victorsample/MainActivity.java @@ -17,10 +17,11 @@ package com.trello.victorsample; import android.os.Bundle; -import android.support.v7.app.ActionBarActivity; import android.widget.ImageView; -public class MainActivity extends ActionBarActivity { +import androidx.appcompat.app.AppCompatActivity; + +public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { diff --git a/settings.gradle b/settings.gradle index c4bc8cb..166cc01 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,5 +1,2 @@ include ':victor' - -// Temporarily exclude this sample, because it uses the published version of Victor -// (which is incompatible with Gradle 6 atm). -// include ':sample' +include ':sample'