Gradle upgrade

This commit is contained in:
Yair Morgenstern 2021-05-07 13:18:48 +03:00
parent fca5b5075e
commit 3a22a1127e
5 changed files with 19 additions and 8 deletions

View File

@ -64,6 +64,10 @@ android {
lintOptions {
disable("MissingTranslation")
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_7
targetCompatibility = JavaVersion.VERSION_1_7
}
}

View File

@ -20,7 +20,7 @@ buildscript {
dependencies {
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${com.unciv.build.BuildConfig.kotlinVersion}")
classpath("de.richsource.gradle.plugins:gwt-gradle-plugin:0.6")
classpath("com.android.tools.build:gradle:4.1.3")
classpath("com.android.tools.build:gradle:4.2.0")
classpath("com.mobidevelop.robovm:robovm-gradle-plugin:2.3.1")
// This is for wrapping the .jar file into a standalone executable

View File

@ -24,7 +24,7 @@ class CityInfo {
lateinit var civInfo: CivilizationInfo
@Transient
lateinit private var centerTileInfo: TileInfo // cached for better performance
private lateinit var centerTileInfo: TileInfo // cached for better performance
@Transient
val range = 2
@ -123,9 +123,11 @@ class CityInfo {
val cityName = nationCities[cityNameIndex]
val cityNameRounds = civInfo.citiesCreated / nationCities.size
val cityNamePrefix = if (cityNameRounds == 0) ""
else if (cityNameRounds == 1) "New "
else "Neo "
val cityNamePrefix = when (cityNameRounds) {
0 -> ""
1 -> "New "
else -> "Neo "
}
name = cityNamePrefix + cityName
}
@ -520,8 +522,12 @@ class CityInfoReligionManager: Counter<String>() {
}
fun getAffectedBySurroundingCities() {
val allCitiesWithin10Tiles = cityInfo.civInfo.gameInfo.civilizations.asSequence().flatMap { it.cities }
.filter { it != cityInfo && it.getCenterTile().aerialDistanceTo(cityInfo.getCenterTile()) <= 10 }
val allCitiesWithin10Tiles =
cityInfo.civInfo.gameInfo.civilizations.asSequence().flatMap { it.cities }
.filter {
it != cityInfo && it.getCenterTile()
.aerialDistanceTo(cityInfo.getCenterTile()) <= 10
}
for (city in allCitiesWithin10Tiles) {
val majorityReligionOfCity = city.religion.getMajorityReligion()
if (majorityReligionOfCity == null) continue

View File

@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip

View File

@ -7,6 +7,7 @@ plugins {
java {
sourceCompatibility = JavaVersion.VERSION_1_6
targetCompatibility = JavaVersion.VERSION_1_7
}
tasks {