Commit 8a273ab7 authored by Mygod's avatar Mygod

Update to Android P DP1

parent f218282e
...@@ -6,9 +6,10 @@ buildscript { ...@@ -6,9 +6,10 @@ buildscript {
ext { ext {
kotlinVersion = '1.2.30' kotlinVersion = '1.2.30'
minSdkVersion = 21 minSdkVersion = 21
sdkVersion = 27 sdkVersion = 'P'
buildToolsVersion = '27.0.3' compileSdkVersion = 'android-P'
supportLibraryVersion = '27.1.0' buildToolsVersion = '28-rc1'
supportLibraryVersion = '28.0.0-alpha1'
takisoftFixVersion = '27.1.0.0' takisoftFixVersion = '27.1.0.0'
playServicesVersion = '11.8.0' playServicesVersion = '11.8.0'
junitVersion = '4.12' junitVersion = '4.12'
...@@ -22,7 +23,7 @@ buildscript { ...@@ -22,7 +23,7 @@ buildscript {
} }
dependencies { 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.github.ben-manes:gradle-versions-plugin:0.17.0'
classpath 'com.google.gms:google-services:3.2.0' classpath 'com.google.gms:google-services:3.2.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
......
...@@ -4,7 +4,7 @@ apply plugin: 'com.android.library' ...@@ -4,7 +4,7 @@ apply plugin: 'com.android.library'
android { android {
buildToolsVersion rootProject.buildToolsVersion buildToolsVersion rootProject.buildToolsVersion
compileSdkVersion rootProject.sdkVersion compileSdkVersion rootProject.compileSdkVersion
defaultConfig { defaultConfig {
minSdkVersion rootProject.minSdkVersion minSdkVersion rootProject.minSdkVersion
......
...@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME ...@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists 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
...@@ -16,7 +16,7 @@ def getCurrentFlavor() { ...@@ -16,7 +16,7 @@ def getCurrentFlavor() {
android { android {
buildToolsVersion rootProject.buildToolsVersion buildToolsVersion rootProject.buildToolsVersion
compileSdkVersion rootProject.sdkVersion compileSdkVersion rootProject.compileSdkVersion
defaultConfig { defaultConfig {
applicationId "com.github.shadowsocks" applicationId "com.github.shadowsocks"
minSdkVersion rootProject.minSdkVersion minSdkVersion rootProject.minSdkVersion
......
/*******************************************************************************
* *
* Copyright (C) 2017 by Max Lv <max.c.lv@gmail.com> *
* Copyright (C) 2017 by Mygod Studio <contact-shadowsocks-android@mygod.be> *
* *
* 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 <http://www.gnu.org/licenses/>. *
* *
*******************************************************************************/
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
}
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()
}
/*******************************************************************************
* *
* Copyright (C) 2017 by Max Lv <max.c.lv@gmail.com> *
* Copyright (C) 2017 by Mygod Studio <contact-shadowsocks-android@mygod.be> *
* *
* 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 <http://www.gnu.org/licenses/>. *
* *
*******************************************************************************/
package android.support.design.widget
object SnackbarConsts {
const val ANIMATION_DURATION = BaseTransientBottomBar.ANIMATION_DURATION.toLong()
}
...@@ -22,9 +22,10 @@ package com.github.shadowsocks.widget ...@@ -22,9 +22,10 @@ package com.github.shadowsocks.widget
import android.animation.ValueAnimator import android.animation.ValueAnimator
import android.content.Context import android.content.Context
import android.support.design.animation.AnimationConsts
import android.support.design.widget.CoordinatorLayout import android.support.design.widget.CoordinatorLayout
import android.support.design.widget.Snackbar import android.support.design.widget.Snackbar
import android.support.design.widget.SnackbarAnimation import android.support.design.widget.SnackbarConsts
import android.util.AttributeSet import android.util.AttributeSet
import android.view.View import android.view.View
import android.view.accessibility.AccessibilityManager import android.view.accessibility.AccessibilityManager
...@@ -52,8 +53,8 @@ class ShrinkUpwardBehavior(context: Context, attrs: AttributeSet) : CoordinatorL ...@@ -52,8 +53,8 @@ class ShrinkUpwardBehavior(context: Context, attrs: AttributeSet) : CoordinatorL
val animator = ValueAnimator() val animator = ValueAnimator()
val start = child.height val start = child.height
animator.setIntValues(start, parent.height) animator.setIntValues(start, parent.height)
animator.interpolator = SnackbarAnimation.FAST_OUT_SLOW_IN_INTERPOLATOR animator.interpolator = AnimationConsts.FAST_OUT_SLOW_IN_INTERPOLATOR
animator.duration = SnackbarAnimation.ANIMATION_DURATION animator.duration = SnackbarConsts.ANIMATION_DURATION
@Suppress("NAME_SHADOWING") @Suppress("NAME_SHADOWING")
animator.addUpdateListener { animator -> animator.addUpdateListener { animator ->
child.layoutParams.height = animator.animatedValue as Int child.layoutParams.height = animator.animatedValue as Int
......
...@@ -5,7 +5,7 @@ apply from: 'gradle-mvn-push.gradle' ...@@ -5,7 +5,7 @@ apply from: 'gradle-mvn-push.gradle'
android { android {
buildToolsVersion rootProject.buildToolsVersion buildToolsVersion rootProject.buildToolsVersion
compileSdkVersion rootProject.sdkVersion compileSdkVersion rootProject.compileSdkVersion
defaultConfig { defaultConfig {
minSdkVersion rootProject.minSdkVersion minSdkVersion rootProject.minSdkVersion
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment