updated build script

This commit is contained in:
Mariotaku Lee 2017-06-20 09:42:36 +08:00
parent 669b178e01
commit b1c9d0e245
No known key found for this signature in database
GPG Key ID: 15C10F89D7C33535
3 changed files with 18 additions and 31 deletions

View File

@ -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',

View File

@ -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

View File

@ -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()