From ad81b55b23095f90d264ebb2c1f39939f40c1d7e Mon Sep 17 00:00:00 2001 From: dovecoteescapee Date: Fri, 9 Aug 2024 02:04:25 +0300 Subject: [PATCH] Fix build.gradle.kts --- app/build.gradle.kts | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 21fdbed..85f75bc 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -1,4 +1,4 @@ -import org.jetbrains.kotlin.gradle.dsl.KotlinCompile +import com.android.build.gradle.internal.tasks.factory.dependsOn plugins { id("com.android.application") @@ -129,17 +129,15 @@ abstract class BuildTun2Socks : BaseTun2SocksTask() { } } -tasks.register("getGomobileBind") { +val getGomobileBind = tasks.register("getGomobileBind") { group = "build" description = "Get gomobile bind for compiling tun2socks" } -tasks.register("buildTun2Socks") { +val buildTun2Socks = tasks.register("buildTun2Socks") { group = "build" description = "Build tun2socks for Android" - dependsOn("getGomobileBind") + dependsOn(getGomobileBind) } -tasks.withType(KotlinCompile::class).configureEach { - dependsOn("buildTun2Socks") -} +tasks.preBuild.dependsOn(buildTun2Socks)