(chore): update codebase
This commit is contained in:
parent
fd15215f15
commit
4e8d46b20e
106 changed files with 29936 additions and 1023 deletions
|
|
@ -25,8 +25,6 @@
|
|||
<!-- DEEP LINK PLUGIN. AUTO-GENERATED. DO NOT REMOVE. -->
|
||||
<intent-filter >
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
<!-- ChromeOS ARC++ uses a different action for deep links -->
|
||||
<action android:name="org.chromium.arc.intent.action.VIEW" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
<data android:scheme="tensamin" />
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
import com.android.build.api.dsl.ApplicationExtension
|
||||
import com.android.build.api.dsl.LibraryExtension
|
||||
|
||||
buildscript {
|
||||
repositories {
|
||||
google()
|
||||
|
|
@ -5,7 +8,7 @@ buildscript {
|
|||
}
|
||||
dependencies {
|
||||
classpath("com.android.tools.build:gradle:8.11.0")
|
||||
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.25")
|
||||
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:2.1.21")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -16,7 +19,24 @@ allprojects {
|
|||
}
|
||||
}
|
||||
|
||||
subprojects {
|
||||
plugins.withId("com.android.application") {
|
||||
extensions.configure<ApplicationExtension>("android") {
|
||||
lint {
|
||||
checkReleaseBuilds = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
plugins.withId("com.android.library") {
|
||||
extensions.configure<LibraryExtension>("android") {
|
||||
lint {
|
||||
checkReleaseBuilds = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tasks.register("clean").configure {
|
||||
delete("build")
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,13 @@
|
|||
import java.io.File
|
||||
import javax.inject.Inject
|
||||
import org.apache.tools.ant.taskdefs.condition.Os
|
||||
import org.gradle.api.DefaultTask
|
||||
import org.gradle.api.GradleException
|
||||
import org.gradle.api.logging.LogLevel
|
||||
import org.gradle.api.tasks.Input
|
||||
import org.gradle.api.tasks.Internal
|
||||
import org.gradle.api.tasks.TaskAction
|
||||
import org.gradle.process.ExecOperations
|
||||
|
||||
open class BuildTask : DefaultTask() {
|
||||
@Input
|
||||
|
|
@ -14,6 +17,13 @@ open class BuildTask : DefaultTask() {
|
|||
@Input
|
||||
var release: Boolean? = null
|
||||
|
||||
@Internal
|
||||
var baseProjectDir: File? = null
|
||||
|
||||
@get:Inject
|
||||
protected open val execOperations: ExecOperations
|
||||
get() = throw UnsupportedOperationException("Gradle injects ExecOperations")
|
||||
|
||||
@TaskAction
|
||||
fun assemble() {
|
||||
val executable = """bun""";
|
||||
|
|
@ -48,15 +58,16 @@ open class BuildTask : DefaultTask() {
|
|||
val rootDirRel = rootDirRel ?: throw GradleException("rootDirRel cannot be null")
|
||||
val target = target ?: throw GradleException("target cannot be null")
|
||||
val release = release ?: throw GradleException("release cannot be null")
|
||||
val baseProjectDir = baseProjectDir ?: throw GradleException("baseProjectDir cannot be null")
|
||||
val args = listOf("tauri", "android", "android-studio-script");
|
||||
|
||||
project.exec {
|
||||
workingDir(File(project.projectDir, rootDirRel))
|
||||
execOperations.exec {
|
||||
workingDir(File(baseProjectDir, rootDirRel))
|
||||
executable(executable)
|
||||
args(args)
|
||||
if (project.logger.isEnabled(LogLevel.DEBUG)) {
|
||||
if (logger.isEnabled(LogLevel.DEBUG)) {
|
||||
args("-vv")
|
||||
} else if (project.logger.isEnabled(LogLevel.INFO)) {
|
||||
} else if (logger.isEnabled(LogLevel.INFO)) {
|
||||
args("-v")
|
||||
}
|
||||
if (release) {
|
||||
|
|
@ -65,4 +76,4 @@ open class BuildTask : DefaultTask() {
|
|||
args(listOf("--target", target))
|
||||
}.assertNormalExitValue()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -72,6 +72,7 @@ open class RustPlugin : Plugin<Project> {
|
|||
rootDirRel = config.rootDirRel
|
||||
target = targetName
|
||||
release = profile == "release"
|
||||
baseProjectDir = project.projectDir
|
||||
}
|
||||
|
||||
buildTask.dependsOn(targetBuildTask)
|
||||
|
|
@ -82,4 +83,4 @@ open class RustPlugin : Plugin<Project> {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue