init projects

This commit is contained in:
2026-06-17 18:58:41 +03:00
parent 8543c4e241
commit 21a768edd5
505 changed files with 19998 additions and 93 deletions
@@ -0,0 +1,4 @@
keystore.properties
release.keystore
*.keystore
build
@@ -0,0 +1,41 @@
import com.android.build.api.dsl.ApplicationExtension
plugins {
alias(libs.plugins.convention.android.app)
alias(libs.plugins.convention.compose)
alias(libs.plugins.convention.koin)
}
extensions.getByType<ApplicationExtension>().apply {
buildFeatures { buildConfig = true }
namespace = "ru.shadowsparky.experimentarium"
defaultConfig {
applicationId = namespace
minSdk = libs.versions.proj.min.get().toInt()
targetSdk = libs.versions.proj.target.get().toInt()
versionCode = 1000
versionName = "1.0"
}
}
koinCompiler {
compileSafety = false
unsafeDslChecks = false
}
dependencies {
implementation(libs.activity.compose)
implementation(libs.material)
implementation(project(":apps:experimentarium:shared"))
implementation(project(":libs:video-player"))
implementation(project(":libs:ui"))
implementation(project(":libs:base"))
debugImplementation(libs.ui.tooling)
compileOnly(libs.ui.tooling.preview.android)
testImplementation(libs.koin.test)
testImplementation(libs.mockk)
testImplementation(kotlin("test-junit"))
androidTestImplementation(libs.junit)
androidTestImplementation(libs.runner)
}
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.INTERNET" />
<application
android:name=".App"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.Material3.DayNight.NoActionBar">
<activity
android:name=".MainActivity"
android:configChanges="screenSize|screenLayout|orientation|smallestScreenSize"
android:exported="true"
android:launchMode="singleInstance"
android:supportsPictureInPicture="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

@@ -0,0 +1,18 @@
package ru.shadowsparky.experimentarium
import android.app.Application
import org.koin.android.ext.koin.androidContext
import org.koin.core.annotation.KoinApplication
import org.koin.plugin.module.dsl.startKoin
@KoinApplication
object Experimentarium
class App : Application() {
override fun onCreate() {
super.onCreate()
startKoin<Experimentarium> {
androidContext(this@App)
}
}
}
@@ -0,0 +1,15 @@
package ru.shadowsparky.experimentarium
import android.os.Bundle
import androidx.activity.compose.setContent
import androidx.appcompat.app.AppCompatActivity
import ru.shadowsparky.experimentarium.shared.TestPlayer
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContent {
TestPlayer()
}
}
}
@@ -0,0 +1,16 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:tint="#000000"
android:viewportWidth="960"
android:viewportHeight="960">
<group
android:scaleX="0.58"
android:scaleY="0.58"
android:translateX="201.6"
android:translateY="201.6">
<path
android:fillColor="@android:color/white"
android:pathData="M40,720Q49,613 105.5,523Q162,433 256,380L182,252Q176,243 179,233Q182,223 192,218Q200,213 210,216Q220,219 226,228L300,356Q386,320 480,320Q574,320 660,356L734,228Q740,219 750,216Q760,213 768,218Q778,223 781,233Q784,243 778,252L704,380Q798,433 854.5,523Q911,613 920,720L40,720ZM280,610Q301,610 315.5,595.5Q330,581 330,560Q330,539 315.5,524.5Q301,510 280,510Q259,510 244.5,524.5Q230,539 230,560Q230,581 244.5,595.5Q259,610 280,610ZM680,610Q701,610 715.5,595.5Q730,581 730,560Q730,539 715.5,524.5Q701,510 680,510Q659,510 644.5,524.5Q630,539 630,560Q630,581 644.5,595.5Q659,610 680,610Z" />
</group>
</vector>
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>
Binary file not shown.

After

Width:  |  Height:  |  Size: 764 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 554 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1012 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="ic_launcher_background">#FFFFFF</color>
</resources>
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Experimentarium</string>
</resources>
+1
View File
@@ -0,0 +1 @@
build
@@ -0,0 +1,20 @@
plugins {
alias(libs.plugins.convention.kmp)
alias(libs.plugins.convention.android.lib)
alias(libs.plugins.convention.compose)
alias(libs.plugins.convention.serialization)
alias(libs.plugins.convention.koin)
}
kotlin {
sourceSets {
commonMain.dependencies {
implementation(project(":libs:base"))
implementation(project(":libs:video-player"))
}
androidMain.dependencies {
}
}
android {
namespace = "ru.shadowsparky.experimentarium.shared"
}
}
@@ -0,0 +1,20 @@
package ru.shadowsparky.experimentarium.shared
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.ui.Modifier
import ru.shadowsparky.koin
import ru.shadowsparky.videoplayer.PlayerController
import ru.shadowsparky.videoplayer.ui.VideoPlayer
private val controller = koin.get<PlayerController>()
@Composable
fun TestPlayer() {
VideoPlayer(controller, modifier = Modifier.fillMaxSize())
LaunchedEffect(controller) {
controller.load("https://samplelib.com/mp4/sample-5s.mp4")
controller.play()
}
}
+4
View File
@@ -0,0 +1,4 @@
build
videobox.db
cache
bin
+32
View File
@@ -0,0 +1,32 @@
@file:OptIn(ExperimentalWasmDsl::class)
import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl
plugins {
alias(libs.plugins.convention.kmp)
alias(libs.plugins.convention.compose)
alias(libs.plugins.convention.koin)
}
kotlin {
sourceSets {
val wasmJsMain by getting {
dependencies {
implementation(project(":libs:base"))
implementation(project(":libs:ui"))
implementation(project(":libs:video-player"))
implementation(project(":apps:experimentarium:shared"))
}
}
}
wasmJs {
browser {
commonWebpackConfig {
outputFileName = "composeApp.js"
}
}
binaries.executable()
}
}
@@ -0,0 +1,26 @@
package ru.shadowsparky.experimentarium
import androidx.compose.ui.ExperimentalComposeUiApi
import androidx.compose.ui.window.ComposeViewport
import com.arkivanov.essenty.lifecycle.LifecycleRegistry
import com.arkivanov.essenty.lifecycle.doOnResume
import kotlinx.browser.document
import org.koin.core.context.startKoin
import org.koin.ksp.generated.module
import org.w3c.dom.HTMLElement
import ru.shadowsparky.CommonModule
import ru.shadowsparky.experimentarium.shared.TestPlayer
import ru.shadowsparky.ui.hideElementById
import ru.shadowsparky.ui.hookPageVisibility
@OptIn(ExperimentalComposeUiApi::class)
fun main() {
val lifecycle = LifecycleRegistry()
startKoin { modules(CommonModule().module) }
val composeRoot = document.getElementById("compose-root") as HTMLElement
hookPageVisibility(lifecycle)
lifecycle.doOnResume { hideElementById("loader") }
ComposeViewport(viewportContainer = composeRoot) {
TestPlayer()
}
}
@@ -0,0 +1,51 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Test Layers</title>
<style>
#loader {
position: fixed;
inset: 0;
display: flex;
justify-content: center;
align-items: center;
background: #111;
z-index: 9999;
}
.spinner {
width: 50px;
height: 50px;
border: 6px solid #ccc;
border-top-color: #09f;
border-radius: 50%;
animation: spin 1s linear infinite;
}
@keyframes spin {
to { transform: rotate(360deg); }
}
html, body {
margin: 0;
padding: 0;
width: 100%;
height: 100%;
background: #000;
overflow: hidden;
}
</style>
<script defer src="/composeApp.js"></script>
</head>
<body>
<div id="app-container" style="position:fixed; inset:0; overflow:hidden;">
<div id="loader">
<div class="spinner"></div>
</div>
<div id="video-layer"
style="position:absolute; inset:0; background:#000; visibility: hidden;"></div>
<div id="compose-root" style="position:absolute; inset:0;"></div>
</div>
</body>
</html>