diff --git a/build.gradle b/build.gradle index dbb4da95..ef6e01b7 100644 --- a/build.gradle +++ b/build.gradle @@ -6,9 +6,10 @@ buildscript { ext { kotlinVersion = '1.2.30' minSdkVersion = 21 - sdkVersion = 27 - buildToolsVersion = '27.0.3' - supportLibraryVersion = '27.1.0' + sdkVersion = 'P' + compileSdkVersion = 'android-P' + buildToolsVersion = '28-rc1' + supportLibraryVersion = '28.0.0-alpha1' takisoftFixVersion = '27.1.0.0' playServicesVersion = '11.8.0' junitVersion = '4.12' @@ -22,7 +23,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:3.0.1' + classpath 'com.android.tools.build:gradle:3.2.0-alpha05' classpath 'com.github.ben-manes:gradle-versions-plugin:0.17.0' classpath 'com.google.gms:google-services:3.2.0' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion" diff --git a/core/build.gradle b/core/build.gradle index 434df1e0..52f3d656 100644 --- a/core/build.gradle +++ b/core/build.gradle @@ -4,7 +4,7 @@ apply plugin: 'com.android.library' android { buildToolsVersion rootProject.buildToolsVersion - compileSdkVersion rootProject.sdkVersion + compileSdkVersion rootProject.compileSdkVersion defaultConfig { minSdkVersion rootProject.minSdkVersion diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 57c7d2d2..3f0f9be6 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.4.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip diff --git a/mobile/build.gradle b/mobile/build.gradle index dc4ade47..4ab6138c 100644 --- a/mobile/build.gradle +++ b/mobile/build.gradle @@ -16,7 +16,7 @@ def getCurrentFlavor() { android { buildToolsVersion rootProject.buildToolsVersion - compileSdkVersion rootProject.sdkVersion + compileSdkVersion rootProject.compileSdkVersion defaultConfig { applicationId "com.github.shadowsocks" minSdkVersion rootProject.minSdkVersion diff --git a/mobile/src/main/java/android/support/design/animation/AnimationConsts.kt b/mobile/src/main/java/android/support/design/animation/AnimationConsts.kt new file mode 100644 index 00000000..6ec640a1 --- /dev/null +++ b/mobile/src/main/java/android/support/design/animation/AnimationConsts.kt @@ -0,0 +1,27 @@ +/******************************************************************************* + * * + * Copyright (C) 2017 by Max Lv * + * Copyright (C) 2017 by Mygod Studio * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program. If not, see . * + * * + *******************************************************************************/ + +package android.support.design.animation + +import android.animation.TimeInterpolator + +object AnimationConsts { + val FAST_OUT_SLOW_IN_INTERPOLATOR: TimeInterpolator get() = AnimationUtils.FAST_OUT_SLOW_IN_INTERPOLATOR +} diff --git a/mobile/src/main/java/android/support/design/widget/SnackbarAnimation.kt b/mobile/src/main/java/android/support/design/widget/SnackbarAnimation.kt deleted file mode 100644 index 7c9169cb..00000000 --- a/mobile/src/main/java/android/support/design/widget/SnackbarAnimation.kt +++ /dev/null @@ -1,8 +0,0 @@ -package android.support.design.widget - -import android.view.animation.Interpolator - -object SnackbarAnimation { - val FAST_OUT_SLOW_IN_INTERPOLATOR: Interpolator get() = AnimationUtils.FAST_OUT_SLOW_IN_INTERPOLATOR - const val ANIMATION_DURATION = BaseTransientBottomBar.ANIMATION_DURATION.toLong() -} diff --git a/mobile/src/main/java/android/support/design/widget/SnackbarConsts.kt b/mobile/src/main/java/android/support/design/widget/SnackbarConsts.kt new file mode 100644 index 00000000..bfa8e440 --- /dev/null +++ b/mobile/src/main/java/android/support/design/widget/SnackbarConsts.kt @@ -0,0 +1,25 @@ +/******************************************************************************* + * * + * Copyright (C) 2017 by Max Lv * + * Copyright (C) 2017 by Mygod Studio * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program. If not, see . * + * * + *******************************************************************************/ + +package android.support.design.widget + +object SnackbarConsts { + const val ANIMATION_DURATION = BaseTransientBottomBar.ANIMATION_DURATION.toLong() +} diff --git a/mobile/src/main/java/com/github/shadowsocks/widget/ShrinkUpwardBehavior.kt b/mobile/src/main/java/com/github/shadowsocks/widget/ShrinkUpwardBehavior.kt index 9f550f94..1fb4fde4 100644 --- a/mobile/src/main/java/com/github/shadowsocks/widget/ShrinkUpwardBehavior.kt +++ b/mobile/src/main/java/com/github/shadowsocks/widget/ShrinkUpwardBehavior.kt @@ -22,9 +22,10 @@ package com.github.shadowsocks.widget import android.animation.ValueAnimator import android.content.Context +import android.support.design.animation.AnimationConsts import android.support.design.widget.CoordinatorLayout import android.support.design.widget.Snackbar -import android.support.design.widget.SnackbarAnimation +import android.support.design.widget.SnackbarConsts import android.util.AttributeSet import android.view.View import android.view.accessibility.AccessibilityManager @@ -52,8 +53,8 @@ class ShrinkUpwardBehavior(context: Context, attrs: AttributeSet) : CoordinatorL val animator = ValueAnimator() val start = child.height animator.setIntValues(start, parent.height) - animator.interpolator = SnackbarAnimation.FAST_OUT_SLOW_IN_INTERPOLATOR - animator.duration = SnackbarAnimation.ANIMATION_DURATION + animator.interpolator = AnimationConsts.FAST_OUT_SLOW_IN_INTERPOLATOR + animator.duration = SnackbarConsts.ANIMATION_DURATION @Suppress("NAME_SHADOWING") animator.addUpdateListener { animator -> child.layoutParams.height = animator.animatedValue as Int diff --git a/plugin/build.gradle b/plugin/build.gradle index 19ec80ad..41786d5b 100644 --- a/plugin/build.gradle +++ b/plugin/build.gradle @@ -5,7 +5,7 @@ apply from: 'gradle-mvn-push.gradle' android { buildToolsVersion rootProject.buildToolsVersion - compileSdkVersion rootProject.sdkVersion + compileSdkVersion rootProject.compileSdkVersion defaultConfig { minSdkVersion rootProject.minSdkVersion