Skip to content

Commit ad9dbf8

Browse files
update kotlin
1 parent f071df0 commit ad9dbf8

3 files changed

Lines changed: 26 additions & 21 deletions

File tree

app/build.gradle

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
* along with this program. If not, see <http://www.gnu.org/licenses/>
1717
*/
1818

19+
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
20+
1921
plugins {
2022
id "com.android.application"
2123
id "kotlin-android"
@@ -98,7 +100,6 @@ android {
98100
applicationIdSuffix = ".BETA"
99101
versionNameSuffix = "-BETA"
100102
minifyEnabled = false
101-
shrinkResources = false
102103
debuggable = true
103104
enableUnitTestCoverage = true
104105
}
@@ -107,23 +108,27 @@ android {
107108
testOptions {
108109
unitTests {
109110
includeAndroidResources = true
110-
all {
111-
jvmArgs("-XX:+EnableDynamicAgentLoading")
112-
testLogging {
113-
events = ["passed", "skipped", "failed", "standardOut", "standardError"]
114-
outputs.upToDateWhen { false }
115-
showStandardStreams = true
116-
}
117-
}
111+
}
112+
}
113+
114+
tasks.withType(Test).configureEach {
115+
jvmArgs("-XX:+EnableDynamicAgentLoading")
116+
testLogging {
117+
events = ["passed", "skipped", "failed", "standardOut", "standardError"]
118+
outputs.upToDateWhen { false }
119+
showStandardStreams = true
118120
}
119121
}
120122

121123
compileOptions {
122124
sourceCompatibility = JavaVersion.VERSION_17
123125
targetCompatibility = JavaVersion.VERSION_17
124126
}
125-
kotlinOptions {
126-
jvmTarget = "17"
127+
128+
kotlin {
129+
compilerOptions {
130+
jvmTarget = JvmTarget.JVM_17
131+
}
127132
}
128133

129134
lint {
@@ -213,9 +218,9 @@ def isReleaseTask() {
213218
static Properties readProperties(propertiesFile) {
214219
if (propertiesFile.canRead()) {
215220
Properties properties = new Properties()
216-
def inputStream = new FileInputStream(propertiesFile)
217-
properties.load(inputStream)
218-
inputStream.close()
221+
propertiesFile.withInputStream { inputStream ->
222+
properties.load(inputStream)
223+
}
219224
return properties
220225
} else {
221226
def message = ">>> Could not read " + propertiesFile.name + " file!"
@@ -225,12 +230,12 @@ static Properties readProperties(propertiesFile) {
225230
}
226231

227232
def static writeProperties(propertiesFile, properties) {
228-
def writer = propertiesFile.newWriter()
229-
properties.store(writer, "Build Properties")
230-
writer.close()
233+
propertiesFile.withWriter { writer ->
234+
properties.store(writer, "Build Properties")
235+
}
231236
}
232237

233-
configurations.all {
238+
configurations.configureEach {
234239
exclude group: 'org.hamcrest', module: 'hamcrest-core'
235240
exclude group: 'org.hamcrest', module: 'hamcrest-library'
236241
}

app/build.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#Build Properties
2-
#Sat May 30 10:26:06 EDT 2026
3-
version_build=8
2+
#Fri Jun 12 17:09:03 EDT 2026
3+
version_build=9
44
version_major=3
55
version_minor=2
66
version_patch=2

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
buildscript {
2222
ext {
23-
kotlin_version = '2.3.21'
23+
kotlin_version = '2.4.0'
2424
}
2525
repositories {
2626
google()

0 commit comments

Comments
 (0)