diff --git a/.gitignore b/.gitignore index 9c2181b03a..6844baa4ec 100644 --- a/.gitignore +++ b/.gitignore @@ -134,3 +134,4 @@ android/assets/fonts/ android/release/android.aab android/assets/maps/ android/release/android.aab.sig +android/release/android-release.aab diff --git a/.travis.yml b/.travis.yml index c382ca712b..69767f7264 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,10 +9,10 @@ android: - platform-tools # The BuildTools version used by your project - - build-tools-28.0.3 + - build-tools-29.0.3 # The SDK version used to compile your project - - android-28 + - android-29 jdk: diff --git a/android/build.gradle b/android/build.gradle index cdbb2e090d..9796b8b98f 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -20,9 +20,9 @@ android { defaultConfig { applicationId "com.unciv.app" minSdkVersion 14 - targetSdkVersion 28 - versionCode 293 - versionName "3.0.0" + targetSdkVersion 29 + versionCode 294 + versionName "3.0.1" } // Had to add this crap for Travis to build, it wanted to sign the app diff --git a/build.gradle b/build.gradle index dfa8620bfb..d0203cbf1b 100644 --- a/build.gradle +++ b/build.gradle @@ -9,6 +9,7 @@ buildscript { repositories { // 以下四行代码为阿里gradle 源 + // Chinese mirrors for quicker loading for chinese devs maven{ url 'https://maven.aliyun.com/repository/jcenter'} maven{ url 'https://maven.aliyun.com/repository/google'} maven{ url 'https://maven.aliyun.com/repository/gradle-plugin'} @@ -42,6 +43,7 @@ allprojects { repositories { // 以下四行代码为阿里gradle 源 + // Chinese mirrors for quicker loading for chinese devs maven{ url 'https://maven.aliyun.com/repository/jcenter'} maven{ url 'https://maven.aliyun.com/repository/google'} maven{ url 'https://maven.aliyun.com/repository/gradle-plugin'} diff --git a/core/src/com/unciv/ui/newgamescreen/PlayerPickerTable.kt b/core/src/com/unciv/ui/newgamescreen/PlayerPickerTable.kt index 5c2c3b7967..5f22837170 100644 --- a/core/src/com/unciv/ui/newgamescreen/PlayerPickerTable.kt +++ b/core/src/com/unciv/ui/newgamescreen/PlayerPickerTable.kt @@ -1,5 +1,6 @@ package com.unciv.ui.newgamescreen +import com.badlogic.gdx.Gdx import com.badlogic.gdx.graphics.Color import com.badlogic.gdx.scenes.scene2d.Touchable import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane @@ -60,11 +61,12 @@ class PlayerPickerTable(val newGameScreen: NewGameScreen, val newGameParameters: playerIdTable.add("Player ID:".toLabel()) val playerIdTextfield = TextField(player.playerId, CameraStageBaseScreen.skin) - playerIdTable.add(playerIdTextfield) + playerIdTable.add(playerIdTextfield).colspan(2) val errorLabel = "Not a valid user id!".toLabel().setFontColor(Color.RED) errorLabel.isVisible=false playerIdTable.add(errorLabel) - playerIdTextfield.addListener { + + fun onPlayerIdTextUpdated(){ try { val uuid = UUID.fromString(playerIdTextfield.text) player.playerId = playerIdTextfield.text @@ -72,19 +74,27 @@ class PlayerPickerTable(val newGameScreen: NewGameScreen, val newGameParameters: } catch (ex: Exception) { errorLabel.isVisible=true } - true } + playerIdTextfield.addListener { onPlayerIdTextUpdated(); true } + playerIdTable.row() val currentUserId = UnCivGame.Current.settings.userId - val setCurrentUserButton = TextButton("Set current user", CameraStageBaseScreen.skin) + val setCurrentUserButton = TextButton("Set current user".tr(), CameraStageBaseScreen.skin) setCurrentUserButton.onClick { playerIdTextfield.text = currentUserId - errorLabel.isVisible = false + onPlayerIdTextUpdated() } playerIdTable.add(setCurrentUserButton) + val copyFromClipboardButton = TextButton("Player ID from clipboard",CameraStageBaseScreen.skin) + copyFromClipboardButton.onClick { + playerIdTextfield.text = Gdx.app.clipboard.contents + onPlayerIdTextUpdated() + } + playerIdTable.add(copyFromClipboardButton).pad(5f) + playerTable.add(playerIdTable).colspan(playerTable.columns) } diff --git a/core/src/com/unciv/ui/worldscreen/optionstable/WorldScreenMenuTable.kt b/core/src/com/unciv/ui/worldscreen/optionstable/WorldScreenMenuTable.kt index 92c1c57540..c840f95f66 100644 --- a/core/src/com/unciv/ui/worldscreen/optionstable/WorldScreenMenuTable.kt +++ b/core/src/com/unciv/ui/worldscreen/optionstable/WorldScreenMenuTable.kt @@ -96,9 +96,9 @@ class WorldScreenMenuTable(val worldScreen: WorldScreen) : PopupTable(worldScree val badGameIdLabel = "".toLabel().setFontColor(Color.RED) badGameIdLabel.isVisible = false multiplayerPopup.addButton("Join Game") { - val gameId = Gdx.app.clipboard.contents.trim() + val gameId = Gdx.app.clipboard.contents try { - UUID.fromString(gameId) + UUID.fromString(gameId.trim()) } catch (ex: Exception) { badGameIdLabel.setText("Invalid game ID!") badGameIdLabel.isVisible = true