Compare commits
No commits in common. "main" and "fm/wolfskin-upstream-1-1-0" have entirely different histories.
main
...
fm/wolfski
12
Makefile
|
|
@ -4,7 +4,7 @@ WOLFSKIN_GRADLE_VOLUME ?= wolfskin-gradle
|
||||||
WOLFSKIN_SECRETS_DIR ?= /opt/stacks/ventoy/machine-parity/manifest-tank/secrets/wolfskin
|
WOLFSKIN_SECRETS_DIR ?= /opt/stacks/ventoy/machine-parity/manifest-tank/secrets/wolfskin
|
||||||
export WOLFSKIN_BUILD_IMAGE WOLFSKIN_GRADLE_VOLUME WOLFSKIN_SECRETS_DIR
|
export WOLFSKIN_BUILD_IMAGE WOLFSKIN_GRADLE_VOLUME WOLFSKIN_SECRETS_DIR
|
||||||
|
|
||||||
.PHONY: build-image apk apk-debug test release-tag tv-release tv-publish tv-tooling-test
|
.PHONY: build-image apk apk-debug test release-tag
|
||||||
build-image:
|
build-image:
|
||||||
docker build --platform linux/amd64 --tag "$(WOLFSKIN_BUILD_IMAGE)" docker
|
docker build --platform linux/amd64 --tag "$(WOLFSKIN_BUILD_IMAGE)" docker
|
||||||
|
|
||||||
|
|
@ -19,13 +19,3 @@ test: build-image
|
||||||
|
|
||||||
release-tag:
|
release-tag:
|
||||||
@bash docker/release-tag.sh
|
@bash docker/release-tag.sh
|
||||||
|
|
||||||
TV_RELEASE_DIR ?= /var/tmp/wolfskin-tv-release-$(VERSION)
|
|
||||||
tv-release: build-image
|
|
||||||
@python3 docker/tv_release.py --version "$(VERSION)" --version-code "$(VERSION_CODE)" --output "$(TV_RELEASE_DIR)" $(TV_RELEASE_FLAGS)
|
|
||||||
|
|
||||||
tv-publish:
|
|
||||||
@python3 docker/tv_publish.py --directory "$(TV_RELEASE_DIR)" $(TV_PUBLISH_FLAGS)
|
|
||||||
|
|
||||||
tv-tooling-test:
|
|
||||||
@python3 -m unittest discover -s docker -p 'test_tv_*.py' -v
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
import com.android.build.api.artifact.SingleArtifact
|
|
||||||
import com.android.build.api.dsl.ApplicationExtension
|
import com.android.build.api.dsl.ApplicationExtension
|
||||||
import com.android.build.api.dsl.ProductFlavor
|
import com.android.build.api.dsl.ProductFlavor
|
||||||
import com.android.build.api.variant.FilterConfiguration
|
import com.android.build.api.variant.FilterConfiguration
|
||||||
|
|
@ -6,7 +5,6 @@ import com.google.protobuf.gradle.id
|
||||||
import com.mikepenz.aboutlibraries.plugin.DuplicateMode
|
import com.mikepenz.aboutlibraries.plugin.DuplicateMode
|
||||||
import com.mikepenz.aboutlibraries.plugin.DuplicateRule
|
import com.mikepenz.aboutlibraries.plugin.DuplicateRule
|
||||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||||
import java.io.File
|
|
||||||
import java.util.Base64
|
import java.util.Base64
|
||||||
import java.util.Properties
|
import java.util.Properties
|
||||||
|
|
||||||
|
|
@ -56,10 +54,6 @@ val gitDescribe =
|
||||||
.standardOutput.asText
|
.standardOutput.asText
|
||||||
.getOrElse("v0.0.0")
|
.getOrElse("v0.0.0")
|
||||||
|
|
||||||
val tvVersion = providers.gradleProperty("tvVersion").orElse("1.1.1")
|
|
||||||
val tvVersionCode = providers.gradleProperty("tvVersionCode")
|
|
||||||
apply(from = "household-version.gradle.kts")
|
|
||||||
|
|
||||||
kotlin {
|
kotlin {
|
||||||
compilerOptions {
|
compilerOptions {
|
||||||
languageVersion = org.jetbrains.kotlin.gradle.dsl.KotlinVersion.KOTLIN_2_3
|
languageVersion = org.jetbrains.kotlin.gradle.dsl.KotlinVersion.KOTLIN_2_3
|
||||||
|
|
@ -86,7 +80,6 @@ configure<ApplicationExtension> {
|
||||||
testInstrumentationRunner = "com.github.damontecres.wholphin.test.WholphinTestRunner"
|
testInstrumentationRunner = "com.github.damontecres.wholphin.test.WholphinTestRunner"
|
||||||
|
|
||||||
buildConfigField("long", "BUILD_TIME", System.currentTimeMillis().toString())
|
buildConfigField("long", "BUILD_TIME", System.currentTimeMillis().toString())
|
||||||
buildConfigField("String", "CONDUCTARR_BASE_URL", "\"https://wolfskin-tv.justinvisser.org\"")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
signingConfigs {
|
signingConfigs {
|
||||||
|
|
@ -137,13 +130,6 @@ configure<ApplicationExtension> {
|
||||||
isDebuggable = true
|
isDebuggable = true
|
||||||
applicationIdSuffix = ".debug"
|
applicationIdSuffix = ".debug"
|
||||||
}
|
}
|
||||||
|
|
||||||
create("optimized") {
|
|
||||||
initWith(getByName("release"))
|
|
||||||
signingConfig = signingConfigs.getByName("debug")
|
|
||||||
applicationIdSuffix = ".opt"
|
|
||||||
matchingFallbacks += "release"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
flavorDimensions += "version"
|
flavorDimensions += "version"
|
||||||
productFlavors {
|
productFlavors {
|
||||||
|
|
@ -208,11 +194,6 @@ configure<ApplicationExtension> {
|
||||||
sourceSets {
|
sourceSets {
|
||||||
getByName("main") {
|
getByName("main") {
|
||||||
kotlin.directories += "$buildDir/generated/seerr_api/src/main/kotlin"
|
kotlin.directories += "$buildDir/generated/seerr_api/src/main/kotlin"
|
||||||
kotlin.directories += "src/wolfskin/java"
|
|
||||||
}
|
|
||||||
getByName("optimized") {
|
|
||||||
kotlin.directories += "src/release/java"
|
|
||||||
baselineProfiles.directories += "src/optimized/baselineProfiles"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -232,13 +213,6 @@ configure<ApplicationExtension> {
|
||||||
|
|
||||||
androidComponents {
|
androidComponents {
|
||||||
onVariants(selector().all()) { variant ->
|
onVariants(selector().all()) { variant ->
|
||||||
if (variant.name == "defaultOptimized") {
|
|
||||||
variant.outputs.forEach {
|
|
||||||
it.versionName.set(tvVersion)
|
|
||||||
// The sentinel is configuration-only: optimized tasks require the explicit input above.
|
|
||||||
it.versionCode.set(tvVersionCode.map(String::toInt).orElse(1))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
variant.outputs
|
variant.outputs
|
||||||
.map { it as com.android.build.api.variant.impl.VariantOutputImpl }
|
.map { it as com.android.build.api.variant.impl.VariantOutputImpl }
|
||||||
.forEach { output ->
|
.forEach { output ->
|
||||||
|
|
@ -250,52 +224,6 @@ androidComponents {
|
||||||
"Wholphin-${variant.flavorName}-${variant.buildType}-${output.versionName.get()}-${output.versionCode.get()}$abi.apk"
|
"Wholphin-${variant.flavorName}-${variant.buildType}-${output.versionName.get()}-${output.versionCode.get()}$abi.apk"
|
||||||
output.outputFileName = outputFileName
|
output.outputFileName = outputFileName
|
||||||
}
|
}
|
||||||
if (variant.name == "defaultOptimized") {
|
|
||||||
tasks.withType<Test>().configureEach {
|
|
||||||
systemProperty("wolfskin.optimizedVersionName", variant.outputs.first().versionName.get())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (variant.name == "defaultDebug") {
|
|
||||||
val packagedApks = variant.artifacts.get(SingleArtifact.APK)
|
|
||||||
val artifactLoader = variant.artifacts.getBuiltArtifactsLoader()
|
|
||||||
val aapt2 = sdkComponents.aapt2.flatMap { it.executable }
|
|
||||||
val checkWolfskinBranding = tasks.register("checkWolfskinBranding") {
|
|
||||||
inputs.dir(packagedApks)
|
|
||||||
inputs.file(aapt2)
|
|
||||||
doLast {
|
|
||||||
val artifacts = checkNotNull(artifactLoader.load(packagedApks.get())) {
|
|
||||||
"Packaged default/debug APK metadata was not found; branding is unverified"
|
|
||||||
}.elements
|
|
||||||
check(artifacts.isNotEmpty()) { "No default/debug APKs were found; branding is unverified" }
|
|
||||||
val header = Regex("""^\s*resource 0x[\da-fA-F]+ (?:[^\s:]+:)?([^\s/]+)/([^\s]+)""")
|
|
||||||
val visibleTypes = setOf("string", "plurals", "array")
|
|
||||||
// Upstream legal attribution and its project URL must survive the branding cutover.
|
|
||||||
val legalNames = setOf("wolfskin_upstream_credit", "wolfskin_upstream_url")
|
|
||||||
val violations = sortedSetOf<String>()
|
|
||||||
artifacts.forEach { artifact ->
|
|
||||||
val dump = providers.exec {
|
|
||||||
commandLine(aapt2.get().asFile, "dump", "resources", artifact.outputFile)
|
|
||||||
}.standardOutput.asText.get()
|
|
||||||
var currentName: String? = null
|
|
||||||
var inspected = 0
|
|
||||||
dump.lineSequence().forEach { line ->
|
|
||||||
val resource = header.find(line)
|
|
||||||
if (resource != null) {
|
|
||||||
currentName = resource.groupValues[2].takeIf { resource.groupValues[1] in visibleTypes }
|
|
||||||
if (currentName != null) inspected++
|
|
||||||
} else if (currentName != null && currentName !in legalNames && line.contains("Wholphin", ignoreCase = true)) {
|
|
||||||
violations += "${File(artifact.outputFile).name}:$currentName"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
check(inspected > 0) { "No packaged string resources were decoded; branding is unverified" }
|
|
||||||
logger.lifecycle("Inspected $inspected string/plural/array resources in ${File(artifact.outputFile).name}")
|
|
||||||
}
|
|
||||||
check(violations.isEmpty()) { "User-visible upstream branding remains: ${violations.joinToString()}" }
|
|
||||||
logger.lifecycle("Wolfskin branding check passed (${artifacts.size} packaged debug APKs; legal attribution preserved)")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
tasks.matching { it.name == "assembleDefaultDebug" }.configureEach { dependsOn(checkWolfskinBranding) }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -360,8 +288,6 @@ tasks.named("preBuild") {
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation(project(":wolfskin-design"))
|
|
||||||
implementation(project(":conductarr-client"))
|
|
||||||
implementation(libs.androidx.core.ktx)
|
implementation(libs.androidx.core.ktx)
|
||||||
implementation(libs.androidx.appcompat)
|
implementation(libs.androidx.appcompat)
|
||||||
implementation(platform(libs.androidx.compose.bom))
|
implementation(platform(libs.androidx.compose.bom))
|
||||||
|
|
@ -476,23 +402,12 @@ dependencies {
|
||||||
testImplementation(libs.mockk.android)
|
testImplementation(libs.mockk.android)
|
||||||
testImplementation(libs.mockk.agent)
|
testImplementation(libs.mockk.agent)
|
||||||
testImplementation(libs.kotlinx.coroutines.test)
|
testImplementation(libs.kotlinx.coroutines.test)
|
||||||
testImplementation("com.squareup.okhttp3:mockwebserver3")
|
|
||||||
testImplementation(libs.androidx.core.testing)
|
testImplementation(libs.androidx.core.testing)
|
||||||
testImplementation(libs.robolectric)
|
testImplementation(libs.robolectric)
|
||||||
testImplementation(libs.hilt.android.testing)
|
testImplementation(libs.hilt.android.testing)
|
||||||
testImplementation(libs.androidx.compose.ui.test.junit4)
|
testImplementation(libs.androidx.compose.ui.test.junit4)
|
||||||
testImplementation("io.github.takahirom.roborazzi:roborazzi:1.77.0")
|
|
||||||
testImplementation("io.github.takahirom.roborazzi:roborazzi-compose:1.77.0")
|
|
||||||
androidTestImplementation(platform(libs.androidx.compose.bom))
|
androidTestImplementation(platform(libs.androidx.compose.bom))
|
||||||
androidTestImplementation(libs.mockk.android)
|
androidTestImplementation(libs.mockk.android)
|
||||||
androidTestImplementation(libs.hilt.android.testing)
|
androidTestImplementation(libs.hilt.android.testing)
|
||||||
androidTestImplementation(libs.androidx.compose.ui.test.manifest)
|
androidTestImplementation(libs.androidx.compose.ui.test.manifest)
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.withType<Test>().configureEach {
|
|
||||||
dependsOn(":wolfskin-design:testDebugUnitTest")
|
|
||||||
systemProperty("robolectric.dependency.dir", project(":wolfskin-design").layout.buildDirectory.dir("robolectric-sdk").get().asFile.absolutePath)
|
|
||||||
systemProperty("robolectric.offline", "true")
|
|
||||||
systemProperty("roborazzi.test.record", "true")
|
|
||||||
systemProperty("wolfskin.captureDirectory", rootProject.layout.buildDirectory.dir("wolfskin-captures").get().asFile.absolutePath)
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -1,18 +0,0 @@
|
||||||
// Household assembly inputs remain mandatory even through aggregate Gradle tasks.
|
|
||||||
val tvVersion = providers.gradleProperty("tvVersion").orElse("1.1.1")
|
|
||||||
val tvVersionCode = providers.gradleProperty("tvVersionCode")
|
|
||||||
|
|
||||||
fun requireHouseholdVersion() {
|
|
||||||
require(tvVersionCode.isPresent) { "Household builds require -PtvVersionCode=<monotonic code>" }
|
|
||||||
require(tvVersionCode.get().toInt() in 1..2100000000) { "Invalid household versionCode" }
|
|
||||||
require(Regex("""\d+\.\d+\.\d+""").matches(tvVersion.get())) { "Household versionName must be plain major.minor.patch" }
|
|
||||||
}
|
|
||||||
|
|
||||||
if (gradle.startParameter.taskNames.any { it.contains("Optimized", ignoreCase = true) }) {
|
|
||||||
requireHouseholdVersion()
|
|
||||||
}
|
|
||||||
tasks.configureEach {
|
|
||||||
if (name.contains("DefaultOptimized", ignoreCase = true)) {
|
|
||||||
doFirst { requireHouseholdVersion() }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
Before Width: | Height: | Size: 34 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 38 KiB |
|
Before Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 33 KiB |
|
Before Width: | Height: | Size: 34 KiB |
|
Before Width: | Height: | Size: 37 KiB |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 37 KiB |
|
Before Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 31 KiB |
|
Before Width: | Height: | Size: 33 KiB |
|
Before Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 31 KiB |
|
Before Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 36 KiB |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 31 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 33 KiB |
|
Before Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 38 KiB |
|
Before Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 39 KiB |
|
Before Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 35 KiB |
|
Before Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 33 KiB |
|
Before Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 22 KiB |