mirror of
https://github.com/yairm210/Unciv.git
synced 2024-12-23 01:04:24 +07:00
Gradle upgrade
This commit is contained in:
parent
fca5b5075e
commit
3a22a1127e
@ -64,6 +64,10 @@ android {
|
||||
lintOptions {
|
||||
disable("MissingTranslation")
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility = JavaVersion.VERSION_1_7
|
||||
targetCompatibility = JavaVersion.VERSION_1_7
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@ -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
|
||||
|
@ -7,6 +7,7 @@ plugins {
|
||||
|
||||
java {
|
||||
sourceCompatibility = JavaVersion.VERSION_1_6
|
||||
targetCompatibility = JavaVersion.VERSION_1_7
|
||||
}
|
||||
|
||||
tasks {
|
||||
|
Loading…
Reference in New Issue
Block a user