Skip to content

Commit ff3685d

Browse files
build: upgrade Gradle & AGP
1 parent f4771c2 commit ff3685d

4 files changed

Lines changed: 39 additions & 17 deletions

File tree

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,6 @@ dokka {
4545
}
4646

4747
tasks.wrapper {
48-
gradleVersion = "8.10.2"
48+
gradleVersion = "8.14.3"
4949
distributionType = Wrapper.DistributionType.BIN
5050
}

gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[versions]
22
kotlin-stdlib = "2.2.0"
33
kotlin-serialization = "1.9.0"
4-
android-gradle = {strictly = "8.7.3"}
4+
android-gradle = {strictly = "8.10.0"}
55
dokka = "2.0.0"
66

77
[libraries]

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

kbigint/build.gradle.kts

Lines changed: 36 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ val os: OperatingSystem = OperatingSystem.current()
88
val libsDir = layout.buildDirectory.get().dir("tmp").dir("libs")
99
val libtommathDir = projectDir.resolve("src/nativeInterop/libtommath")
1010

11+
interface InjectedExecOps {
12+
@get:Inject val execOps: ExecOperations
13+
}
14+
1115
fun KotlinNativeTarget.libtommath() {
1216
compilations.configureEach {
1317
cinterops.create("tommath") {
@@ -128,8 +132,10 @@ android {
128132

129133
if (os.isLinux) {
130134
tasks.getByName<CInteropProcess>("cinteropTommathLinuxX64") {
135+
val execOps = project.objects.newInstance<InjectedExecOps>().execOps
136+
131137
doFirst {
132-
exec {
138+
execOps.exec {
133139
executable = "make"
134140
workingDir = libtommathDir
135141
args("clean", "libtommath.a")
@@ -146,10 +152,12 @@ if (os.isLinux) {
146152
}
147153

148154
tasks.getByName<CInteropProcess>("cinteropTommathLinuxArm64") {
155+
val execOps = project.objects.newInstance<InjectedExecOps>().execOps
156+
149157
outputs.file(libsDir.dir(konanTarget.name).file("libtommath.a"))
150158

151159
doFirst {
152-
exec {
160+
execOps.exec {
153161
executable = "make"
154162
workingDir = libtommathDir
155163
args("clean", "libtommath.a")
@@ -167,10 +175,12 @@ if (os.isLinux) {
167175
}
168176

169177
tasks.getByName<CInteropProcess>("cinteropTommathMingwX64") {
178+
val execOps = project.objects.newInstance<InjectedExecOps>().execOps
179+
170180
outputs.file(libsDir.dir(konanTarget.name).file("libtommath.a"))
171181

172182
doFirst {
173-
exec {
183+
execOps.exec {
174184
executable = "make"
175185
workingDir = libtommathDir
176186
args("clean", "libtommath.a")
@@ -189,10 +199,12 @@ if (os.isLinux) {
189199
}
190200
} else if (os.isWindows) {
191201
tasks.getByName<CInteropProcess>("cinteropTommathMingwX64") {
202+
val execOps = project.objects.newInstance<InjectedExecOps>().execOps
203+
192204
outputs.file(libsDir.dir(konanTarget.name).file("libtommath.a"))
193205

194206
doFirst {
195-
exec {
207+
execOps.exec {
196208
executable = "make"
197209
workingDir = libtommathDir
198210
args("clean", "libtommath.a")
@@ -211,17 +223,19 @@ if (os.isLinux) {
211223
}
212224
} else if (os.isMacOsX) {
213225
tasks.getByName<CInteropProcess>("cinteropTommathMacosX64") {
226+
val execOps = project.objects.newInstance<InjectedExecOps>().execOps
227+
214228
outputs.file(libsDir.dir(konanTarget.name).file("libtommath.a"))
215229

216230
doFirst {
217231
val output = ByteArrayOutputStream()
218-
exec {
232+
execOps.exec {
219233
standardOutput = output
220234
commandLine("xcrun", "--sdk", "macosx", "--show-sdk-path")
221235
}
222236
val sysroot = output.use { it.toString().trimEnd() }
223237

224-
exec {
238+
execOps.exec {
225239
executable = "make"
226240
workingDir = libtommathDir
227241
args("clean", "libtommath.a")
@@ -240,17 +254,19 @@ if (os.isLinux) {
240254
}
241255

242256
tasks.getByName<CInteropProcess>("cinteropTommathMacosArm64") {
257+
val execOps = project.objects.newInstance<InjectedExecOps>().execOps
258+
243259
outputs.file(libsDir.dir(konanTarget.name).file("libtommath.a"))
244260

245261
doFirst {
246262
val output = ByteArrayOutputStream()
247-
exec {
263+
execOps.exec {
248264
standardOutput = output
249265
commandLine("xcrun", "--sdk", "macosx", "--show-sdk-path")
250266
}
251267
val sysroot = output.use { it.toString().trimEnd() }
252268

253-
exec {
269+
execOps.exec {
254270
executable = "make"
255271
workingDir = libtommathDir
256272
args("clean", "libtommath.a")
@@ -269,17 +285,19 @@ if (os.isLinux) {
269285
}
270286

271287
tasks.getByName<CInteropProcess>("cinteropTommathIosArm64") {
288+
val execOps = project.objects.newInstance<InjectedExecOps>().execOps
289+
272290
outputs.file(libsDir.dir(konanTarget.name).file("libtommath.a"))
273291

274292
doFirst {
275293
val output = ByteArrayOutputStream()
276-
exec {
294+
execOps.exec {
277295
standardOutput = output
278296
commandLine("xcrun", "--sdk", "iphoneos", "--show-sdk-path")
279297
}
280298
val sysroot = output.use { it.toString().trimEnd() }
281299

282-
exec {
300+
execOps.exec {
283301
executable = "make"
284302
workingDir = libtommathDir
285303
args("clean", "libtommath.a")
@@ -298,17 +316,19 @@ if (os.isLinux) {
298316
}
299317

300318
tasks.getByName<CInteropProcess>("cinteropTommathIosX64") {
319+
val execOps = project.objects.newInstance<InjectedExecOps>().execOps
320+
301321
outputs.file(libsDir.dir(konanTarget.name).file("libtommath.a"))
302322

303323
doFirst {
304324
val output = ByteArrayOutputStream()
305-
exec {
325+
execOps.exec {
306326
standardOutput = output
307327
commandLine("xcrun", "--sdk", "iphonesimulator", "--show-sdk-path")
308328
}
309329
val sysroot = output.use { it.toString().trimEnd() }
310330

311-
exec {
331+
execOps.exec {
312332
executable = "make"
313333
workingDir = libtommathDir
314334
args("clean", "libtommath.a")
@@ -327,17 +347,19 @@ if (os.isLinux) {
327347
}
328348

329349
tasks.getByName<CInteropProcess>("cinteropTommathIosSimulatorArm64") {
350+
val execOps = project.objects.newInstance<InjectedExecOps>().execOps
351+
330352
outputs.file(libsDir.dir(konanTarget.name).file("libtommath.a"))
331353

332354
doFirst {
333355
val output = ByteArrayOutputStream()
334-
exec {
356+
execOps.exec {
335357
standardOutput = output
336358
commandLine("xcrun", "--sdk", "iphonesimulator", "--show-sdk-path")
337359
}
338360
val sysroot = output.use { it.toString().trimEnd() }
339361

340-
exec {
362+
execOps.exec {
341363
executable = "make"
342364
workingDir = libtommathDir
343365
args("clean", "libtommath.a")

0 commit comments

Comments
 (0)