From b1c9d0e2455a728c458eaabd7a9d968010c2ae75 Mon Sep 17 00:00:00 2001 From: Mariotaku Lee Date: Tue, 20 Jun 2017 09:42:36 +0800 Subject: [PATCH] updated build script --- build.gradle | 10 +++++--- twidere/build.gradle | 24 ++++++++----------- .../fragment/CreateUserListDialogFragment.kt | 15 +----------- 3 files changed, 18 insertions(+), 31 deletions(-) diff --git a/build.gradle b/build.gradle index 0e0753be3..2ba0266b4 100644 --- a/build.gradle +++ b/build.gradle @@ -23,7 +23,6 @@ allprojects { projectVersionName = '3.6.21' } - repositories { mavenLocal() jcenter() @@ -36,6 +35,13 @@ allprojects { subprojects { buildscript { ext { + kotlinVersion = '1.1.2-5' + pluginVersions = [ + AndroidSvgDrawable: '3.0.0', + Fabric : '1.22.1', + PlayPublisher : '1.1.5', + PlayServices : '3.1.0', + ] libVersions = [ Kotlin : '1.1.2-5', SupportLib : '26.0.0-beta2', @@ -45,8 +51,6 @@ subprojects { PlayServices : '11.0.1', MapsUtils : '0.4.4', Crashlyrics : '2.6.8', - FabricPlugin : '1.22.1', - PlayPublisher : '1.1.5', DropboxCoreSdk : '2.1.2', GoogleDriveApi : 'v3-rev61-1.22.0', Exoplayer : 'r2.2.0', diff --git a/twidere/build.gradle b/twidere/build.gradle index a03c592ed..15d444ffe 100644 --- a/twidere/build.gradle +++ b/twidere/build.gradle @@ -20,18 +20,18 @@ buildscript { } dependencies { - // START Non-FOSS component - classpath "io.fabric.tools:gradle:${libVersions['FabricPlugin']}" - classpath "com.github.triplet.gradle:play-publisher:${libVersions['PlayPublisher']}" - classpath 'com.google.gms:google-services:3.0.0' - // END Non-FOSS component - - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${libVersions['Kotlin']}" - classpath "org.jetbrains.kotlin:kotlin-android-extensions:${libVersions['Kotlin']}" - classpath('fr.avianey.androidsvgdrawable:gradle-plugin:3.0.0') { + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlinVersion}" + classpath "org.jetbrains.kotlin:kotlin-android-extensions:${kotlinVersion}" + classpath("fr.avianey.androidsvgdrawable:gradle-plugin:${pluginVersions['AndroidSvgDrawable']}") { // should be excluded to avoid conflict exclude group: 'xerces' } + + // START Non-FOSS component + classpath "io.fabric.tools:gradle:${pluginVersions['Fabric']}" + classpath "com.github.triplet.gradle:play-publisher:${pluginVersions['PlayPublisher']}" + classpath "com.google.gms:google-services:${pluginVersions['PlayServices']}" + // END Non-FOSS component } } @@ -247,8 +247,4 @@ play { jsonFile = rootProject.file('private/google_play_publish.json') track = 'beta' } -// END Non-FOSS component - -// START Non-FOSS component -apply plugin: 'com.google.gms.google-services' -// END Non-FOSS component +// END Non-FOSS component \ No newline at end of file diff --git a/twidere/src/main/kotlin/org/mariotaku/twidere/fragment/CreateUserListDialogFragment.kt b/twidere/src/main/kotlin/org/mariotaku/twidere/fragment/CreateUserListDialogFragment.kt index 27bd49897..1badb674b 100644 --- a/twidere/src/main/kotlin/org/mariotaku/twidere/fragment/CreateUserListDialogFragment.kt +++ b/twidere/src/main/kotlin/org/mariotaku/twidere/fragment/CreateUserListDialogFragment.kt @@ -20,7 +20,6 @@ package org.mariotaku.twidere.fragment import android.app.Dialog -import android.content.DialogInterface import android.os.Bundle import android.support.v7.app.AlertDialog import android.text.TextUtils @@ -36,18 +35,7 @@ import org.mariotaku.twidere.model.UserKey import org.mariotaku.twidere.text.validator.UserListNameValidator import org.mariotaku.twidere.util.ParseUtils -class CreateUserListDialogFragment : BaseDialogFragment(), DialogInterface.OnClickListener { - - override fun onClick(dialog: DialogInterface, which: Int) { - when (which) { - DialogInterface.BUTTON_POSITIVE -> { - // Workaround for "Invalid Android class type: UNKNOWN" - dialog as Dialog - - } - } - - } +class CreateUserListDialogFragment : BaseDialogFragment() { override fun onCreateDialog(savedInstanceState: Bundle?): Dialog { val builder = AlertDialog.Builder(context) @@ -65,7 +53,6 @@ class CreateUserListDialogFragment : BaseDialogFragment(), DialogInterface.OnCli if (TextUtils.isEmpty(name)) return@positive twitterWrapper.createUserListAsync(accountKey, name, isPublic, description) } - builder.setNegativeButton(android.R.string.cancel, null) val dialog = builder.create() dialog.applyOnShow { applyTheme()