diff --git a/buildSrc/src/main/kotlin/ProjectConfig.kt b/buildSrc/src/main/kotlin/ProjectConfig.kt index e07208970..baf5b07e4 100644 --- a/buildSrc/src/main/kotlin/ProjectConfig.kt +++ b/buildSrc/src/main/kotlin/ProjectConfig.kt @@ -13,3 +13,8 @@ const val NEWPIPE_VERSION_NAME = "0.28.7" const val NEWPIPE_APPLICATION_ID_OLD = "org.schabi.newpipe" const val NEWPIPE_APPLICATION_ID_NEW = "net.newpipe.app" + +// Sulkta fork — Straw +const val STRAW_VERSION_CODE = 1 +const val STRAW_VERSION_NAME = "0.1.0-day1" +const val STRAW_APPLICATION_ID = "com.sulkta.straw" diff --git a/settings.gradle.kts b/settings.gradle.kts index 1b616793f..45bf0a6f6 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -20,7 +20,8 @@ dependencyResolutionManagement { maven(url = "https://repo.clojars.org") } } -include (":app") // androidApp +include (":app") // androidApp (legacy NewPipe) +include(":strawApp") // Sulkta fork — Straw Android app shell include(":desktopApp") include("shared") diff --git a/strawApp/build.gradle.kts b/strawApp/build.gradle.kts new file mode 100644 index 000000000..847b39559 --- /dev/null +++ b/strawApp/build.gradle.kts @@ -0,0 +1,68 @@ +/* + * SPDX-FileCopyrightText: 2026 Sulkta + * SPDX-License-Identifier: GPL-3.0-or-later + * + * :strawApp — thin Android application shell around :shared (the KMP Compose + * code). Lives alongside the legacy :app module so we don't break it. + */ + +import com.android.build.api.dsl.ApplicationExtension + +plugins { + alias(libs.plugins.android.application) + alias(libs.plugins.jetbrains.kotlin.compose) + alias(libs.plugins.jetbrains.kotlinx.serialization) +} + +kotlin { + jvmToolchain(21) +} + +configure { + compileSdk { + version = release(NEWPIPE_VERSION_SDK_COMPILE_MAJOR) { + minorApiLevel = NEWPIPE_VERSION_SDK_COMPILE_MINOR + } + } + namespace = STRAW_APPLICATION_ID + + defaultConfig { + applicationId = STRAW_APPLICATION_ID + minSdk { version = release(24) } + targetSdk { version = release(NEWPIPE_VERSION_SDK_TARGET) } + versionCode = STRAW_VERSION_CODE + versionName = STRAW_VERSION_NAME + resValue("string", "app_name", "Straw") + } + + buildTypes { + debug { + isDebuggable = true + applicationIdSuffix = ".debug" + resValue("string", "app_name", "Straw debug") + } + release { + isMinifyEnabled = false + } + } + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_21 + targetCompatibility = JavaVersion.VERSION_21 + } + + buildFeatures { + compose = true + buildConfig = true + resValues = true + } +} + +dependencies { + implementation(libs.androidx.activity) + implementation(libs.androidx.core) + implementation(libs.jetbrains.compose.runtime) + implementation(libs.jetbrains.compose.foundation) + implementation(libs.jetbrains.compose.material3) + implementation(libs.jetbrains.compose.ui) +} diff --git a/strawApp/src/main/AndroidManifest.xml b/strawApp/src/main/AndroidManifest.xml new file mode 100644 index 000000000..6d4c7aec8 --- /dev/null +++ b/strawApp/src/main/AndroidManifest.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + diff --git a/strawApp/src/main/kotlin/com/sulkta/straw/StrawActivity.kt b/strawApp/src/main/kotlin/com/sulkta/straw/StrawActivity.kt new file mode 100644 index 000000000..0e9f43c2b --- /dev/null +++ b/strawApp/src/main/kotlin/com/sulkta/straw/StrawActivity.kt @@ -0,0 +1,33 @@ +/* + * SPDX-FileCopyrightText: 2026 Sulkta + * SPDX-License-Identifier: GPL-3.0-or-later + */ + +package com.sulkta.straw + +import android.os.Bundle +import androidx.activity.ComponentActivity +import androidx.activity.compose.setContent +import androidx.activity.enableEdgeToEdge +import androidx.compose.foundation.isSystemInDarkTheme +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Surface +import androidx.compose.material3.darkColorScheme +import androidx.compose.material3.lightColorScheme +import androidx.compose.ui.Modifier +import androidx.compose.foundation.layout.fillMaxSize + +class StrawActivity : ComponentActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + enableEdgeToEdge() + super.onCreate(savedInstanceState) + setContent { + val scheme = if (isSystemInDarkTheme()) darkColorScheme() else lightColorScheme() + MaterialTheme(colorScheme = scheme) { + Surface(modifier = Modifier.fillMaxSize()) { + StrawHome() + } + } + } + } +} diff --git a/strawApp/src/main/kotlin/com/sulkta/straw/StrawHome.kt b/strawApp/src/main/kotlin/com/sulkta/straw/StrawHome.kt new file mode 100644 index 000000000..2a281ac74 --- /dev/null +++ b/strawApp/src/main/kotlin/com/sulkta/straw/StrawHome.kt @@ -0,0 +1,42 @@ +/* + * SPDX-FileCopyrightText: 2026 Sulkta + * SPDX-License-Identifier: GPL-3.0-or-later + */ + +package com.sulkta.straw + +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.Spacer +import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.padding +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.unit.dp + +@Composable +fun StrawHome() { + Column( + modifier = Modifier + .fillMaxSize() + .padding(24.dp), + verticalArrangement = Arrangement.Center, + horizontalAlignment = Alignment.CenterHorizontally, + ) { + Text( + text = "straw", + style = MaterialTheme.typography.displayLarge, + color = MaterialTheme.colorScheme.primary, + ) + Spacer(modifier = Modifier.height(8.dp)) + Text( + text = "v0.1.0-day1 — Sulkta", + style = MaterialTheme.typography.bodyMedium, + color = MaterialTheme.colorScheme.onSurfaceVariant, + ) + } +}