Skip to content

Commit

Permalink
Gradle upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
yairm210 committed May 7, 2021
1 parent fca5b50 commit 3a22a11
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 8 deletions.
4 changes: 4 additions & 0 deletions android/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ android {
lintOptions {
disable("MissingTranslation")
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_7
targetCompatibility = JavaVersion.VERSION_1_7
}
}


Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 12 additions & 6 deletions core/src/com/unciv/logic/city/CityInfo.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
}
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions tests/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ plugins {

java {
sourceCompatibility = JavaVersion.VERSION_1_6
targetCompatibility = JavaVersion.VERSION_1_7
}

tasks {
Expand Down

0 comments on commit 3a22a11

Please sign in to comment.