This commit is contained in:
parent
ebf14bd96a
commit
9cb8ec6183
66 changed files with 349 additions and 29242 deletions
|
|
@ -25,6 +25,8 @@
|
|||
<!-- 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,6 +1,3 @@
|
|||
import com.android.build.api.dsl.ApplicationExtension
|
||||
import com.android.build.api.dsl.LibraryExtension
|
||||
|
||||
buildscript {
|
||||
repositories {
|
||||
google()
|
||||
|
|
@ -8,7 +5,7 @@ buildscript {
|
|||
}
|
||||
dependencies {
|
||||
classpath("com.android.tools.build:gradle:8.11.0")
|
||||
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:2.1.21")
|
||||
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.25")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -19,24 +16,7 @@ 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,13 +1,10 @@
|
|||
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
|
||||
|
|
@ -17,13 +14,6 @@ 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""";
|
||||
|
|
@ -58,16 +48,15 @@ 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");
|
||||
|
||||
execOperations.exec {
|
||||
workingDir(File(baseProjectDir, rootDirRel))
|
||||
project.exec {
|
||||
workingDir(File(project.projectDir, rootDirRel))
|
||||
executable(executable)
|
||||
args(args)
|
||||
if (logger.isEnabled(LogLevel.DEBUG)) {
|
||||
if (project.logger.isEnabled(LogLevel.DEBUG)) {
|
||||
args("-vv")
|
||||
} else if (logger.isEnabled(LogLevel.INFO)) {
|
||||
} else if (project.logger.isEnabled(LogLevel.INFO)) {
|
||||
args("-v")
|
||||
}
|
||||
if (release) {
|
||||
|
|
@ -76,4 +65,4 @@ open class BuildTask : DefaultTask() {
|
|||
args(listOf("--target", target))
|
||||
}.assertNormalExitValue()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -72,7 +72,6 @@ open class RustPlugin : Plugin<Project> {
|
|||
rootDirRel = config.rootDirRel
|
||||
target = targetName
|
||||
release = profile == "release"
|
||||
baseProjectDir = project.projectDir
|
||||
}
|
||||
|
||||
buildTask.dependsOn(targetBuildTask)
|
||||
|
|
@ -83,4 +82,4 @@ open class RustPlugin : Plugin<Project> {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue