Skip to content

Commit

Permalink
Migrate to AndroidX (#11)
Browse files Browse the repository at this point in the history
Migrate to AndroidX
  • Loading branch information
Shusshu authored May 22, 2020
1 parent 62ec783 commit c4d1d65
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 17 deletions.
11 changes: 6 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ buildscript {
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0'
classpath 'com.android.tools.build:gradle:3.6.3'
}
}

Expand All @@ -16,14 +16,15 @@ allprojects {
}

ext {
compileSdkVersion = 26
buildToolsVersion = '27.0.0'
compileSdkVersion = 29
buildToolsVersion = '29.0.2'
minSdkVersion = 15
targetSdkVersion = compileSdkVersion

supportLibVersion = '27.0.0'
appcompatLibVersion = '1.1.0'
annotationLibVersion = '1.1.0'
}

task clean(type: Delete) {
delete rootProject.buildDir
}
}
6 changes: 3 additions & 3 deletions expandicon-sample/build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
apply plugin: 'com.android.application'

dependencies {
compile project(':expandicon')
compile "com.android.support:appcompat-v7:$supportLibVersion"
implementation project(':expandicon')
implementation("androidx.appcompat:appcompat:$appcompatLibVersion")
}

android {
Expand All @@ -18,4 +18,4 @@ android {

vectorDrawables.useSupportLibrary = true
}
}
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
package com.github.zagum.expandicon.sample;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.GestureDetector;
import android.view.MotionEvent;
import android.view.View;

import androidx.appcompat.app.AppCompatActivity;

import com.github.zagum.expandicon.ExpandIconView;

public class SampleActivity extends AppCompatActivity implements GestureDetector.OnGestureListener {
Expand Down
4 changes: 2 additions & 2 deletions expandicon/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apply plugin: 'com.android.library'

dependencies {
compile "com.android.support:appcompat-v7:$supportLibVersion"
implementation("androidx.annotation:annotation:$annotationLibVersion")
}

android {
Expand All @@ -11,4 +11,4 @@ android {
defaultConfig {
minSdkVersion rootProject.ext.minSdkVersion
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,15 @@
import android.graphics.Path;
import android.graphics.Point;
import android.os.Build;
import android.support.annotation.FloatRange;
import android.support.annotation.IntDef;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.util.AttributeSet;
import android.view.View;
import android.view.animation.DecelerateInterpolator;

import androidx.annotation.FloatRange;
import androidx.annotation.IntDef;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;

Expand Down
2 changes: 2 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@ org.gradle.jvmargs=-Xmx1536m
# 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

android.useAndroidX=true
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Tue Oct 31 10:58:26 MSK 2017
#Fri May 22 11:37:18 CEST 2020
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip

0 comments on commit c4d1d65

Please sign in to comment.