diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000000..58c62231e1 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,29 @@ +# AGENTS.md + +## Build + +### APK Build Command +```bash +JAVA_HOME=/usr/lib/jvm/java-17-openjdk ./gradlew :smarttubetv:assembleStstableDebug +``` + +### Java Version Fix +AGP 7.4.2 + Java 21 causes a D8 NPE during dexing (`VideoCardPresenter$2.class`). Must use Java 17: +```bash +export JAVA_HOME=/usr/lib/jvm/java-17-openjdk +``` + +### Module Compilation (fast check, no APK) +```bash +./gradlew :common:compileStstableDebugJavaWithJavac +``` + +### Install to TV +```bash +adb connect : +adb install -r +# If signature mismatch: adb uninstall && adb install +``` + +### Package Name +- `org.smarttube.stable` (stable flavor) diff --git a/common/build.gradle b/common/build.gradle index 35466e810e..b2dc6acc3b 100644 --- a/common/build.gradle +++ b/common/build.gradle @@ -11,7 +11,10 @@ android { compileSdkVersion project.properties.compileSdkVersion buildToolsVersion project.properties.buildToolsVersion - testOptions.unitTests.includeAndroidResources = true + testOptions { + unitTests.includeAndroidResources = true + unitTests.returnDefaultValues = true + } defaultConfig { minSdkVersion project.properties.minSdkVersion @@ -57,6 +60,7 @@ dependencies { implementation 'androidx.appcompat:appcompat:' + appCompatXVersion testImplementation 'junit:junit:' + junitVersion testImplementation 'org.robolectric:robolectric:' + robolectricVersion + testImplementation 'org.mockito:mockito-core:' + mockitoVersion implementation project(':sharedutils') implementation project(':fragment-1.1.0') @@ -103,4 +107,7 @@ dependencies { implementation project(':appupdatechecker2') implementation project(':slidableactivity') // https://github.com/r0adkll/Slidr + + implementation 'org.nanohttpd:nanohttpd:2.3.1' + implementation 'org.nanohttpd:nanohttpd-websocket:2.3.1' } diff --git a/common/src/main/AndroidManifest.xml b/common/src/main/AndroidManifest.xml index cfb7b4ecc4..1cd71f0800 100644 --- a/common/src/main/AndroidManifest.xml +++ b/common/src/main/AndroidManifest.xml @@ -1,5 +1,7 @@ + @@ -19,6 +21,7 @@ + diff --git a/common/src/main/java/com/liskovsoft/smartyoutubetv2/common/app/models/data/Playlist.java b/common/src/main/java/com/liskovsoft/smartyoutubetv2/common/app/models/data/Playlist.java index 3107327107..f600046a9e 100644 --- a/common/src/main/java/com/liskovsoft/smartyoutubetv2/common/app/models/data/Playlist.java +++ b/common/src/main/java/com/liskovsoft/smartyoutubetv2/common/app/models/data/Playlist.java @@ -16,6 +16,7 @@ public class Playlist { private final List