fix
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import java.util.Properties
|
||||
import groovy.json.JsonSlurper
|
||||
|
||||
plugins {
|
||||
id("com.android.application")
|
||||
@@ -53,11 +54,19 @@ android {
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
maven {
|
||||
url = uri(rustlsPlatformVerifierMavenDir())
|
||||
metadataSources.artifact()
|
||||
}
|
||||
}
|
||||
|
||||
rust {
|
||||
rootDirRel = "../../../"
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation("rustls:rustls-platform-verifier:latest.release")
|
||||
implementation("androidx.webkit:webkit:1.14.0")
|
||||
implementation("androidx.appcompat:appcompat:1.7.1")
|
||||
implementation("androidx.activity:activity-ktx:1.10.1")
|
||||
@@ -68,4 +77,28 @@ dependencies {
|
||||
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.0")
|
||||
}
|
||||
|
||||
apply(from = "tauri.build.gradle.kts")
|
||||
apply(from = "tauri.build.gradle.kts")
|
||||
|
||||
fun rustlsPlatformVerifierMavenDir(): String {
|
||||
val manifestPath = providers.exec {
|
||||
commandLine(
|
||||
"cargo",
|
||||
"metadata",
|
||||
"--format-version",
|
||||
"1",
|
||||
"--filter-platform",
|
||||
"aarch64-linux-android",
|
||||
"--manifest-path",
|
||||
rootProject.file("../../Cargo.toml").absolutePath,
|
||||
)
|
||||
}.standardOutput.asText.get()
|
||||
|
||||
val metadata = JsonSlurper().parseText(manifestPath) as Map<*, *>
|
||||
val packages = metadata["packages"] as List<*>
|
||||
val rustlsAndroidPackage = packages
|
||||
.map { it as Map<*, *> }
|
||||
.first { it["name"] == "rustls-platform-verifier-android" }
|
||||
val rustlsManifest = file(rustlsAndroidPackage["manifest_path"] as String)
|
||||
|
||||
return File(rustlsManifest.parentFile, "maven").path
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user