Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.idea/
*.iml
*.apk
.DS_Store
Expand All @@ -21,3 +22,4 @@ releases
/plugins/.idea/workspace.xml
/.kotlin
/.idea/deviceManager.xml
ffmpeg/libs/
10 changes: 6 additions & 4 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -127,20 +127,20 @@ android {
unitTests.isIncludeAndroidResources = true
execution = "ANDROIDX_TEST_ORCHESTRATOR"
managedDevices {
devices.create<ManagedVirtualDevice>("pixel5") {
allDevices.create<ManagedVirtualDevice>("pixel5") {
device = "Pixel 5"
apiLevel = 31
}
devices.create<ManagedVirtualDevice>("nexus7") {
allDevices.create<ManagedVirtualDevice>("nexus7") {
device = "Nexus 7"
apiLevel = 31
}
devices.create<ManagedVirtualDevice>("nexus10") {
allDevices.create<ManagedVirtualDevice>("nexus10") {
device = "Nexus 10"
apiLevel = 31
}
groups.create("screenshotDevices") {
targetDevices.addAll(devices.toList())
targetDevices.addAll(allDevices.toList())
}
}
}
Expand Down Expand Up @@ -172,6 +172,8 @@ dependencies {
implementation(projects.data)
implementation(projects.playback)
implementation(projects.ffmpeg)
implementation(files("../ffmpeg/build/downloaded-libs/ffmpeg-kit-full-gpl-6.0-2.LTS.aar")) // Point to build dir
implementation("com.arthenica:smart-exception-java9:0.2.1")
implementation(projects.scanner)
implementation(projects.playbackScreen)
implementation(projects.sleepTimer)
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/drawable/ic_launcher.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_foreground" />
<background android:drawable="@drawable/ic_launcher_background_gradient" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
<monochrome android:drawable="@drawable/ic_launcher_monochrome" />
</adaptive-icon>
9 changes: 9 additions & 0 deletions app/src/main/res/drawable/ic_launcher_background_gradient.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient
android:angle="270"
android:startColor="@color/ic_launcher_background_start"
android:endColor="@color/ic_launcher_background_end"
android:type="linear" />
</shape>
40 changes: 20 additions & 20 deletions app/src/main/res/drawable/ic_launcher_foreground.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,25 @@
<group
android:translateX="248"
android:translateY="238">
<path android:fillColor="@color/ic_launcher_background" android:pathData="M91.26,309.51l-41.97,29.23l207.34,72.68l207.34,-73.03l-40.99,-28.88c-42.6,7.18 -92.04,-5.54 -126.02,10.35l-0.12,0.05l-0.01,0.01c-5.23,2.37 -9.96,5.42 -14.26,9.38c-7.56,6.77 -13.82,16.05 -18.36,28.69l-7.59,34.86l-7.35,-33.77c-5.43,-15.83 -13.45,-26.5 -23.32,-33.64c-0.16,-0.11 -0.32,-0.22 -0.47,-0.33c-0.63,-0.45 -1.27,-0.88 -1.91,-1.3c-33.56,-21.77 -86.63,-6.6 -132.31,-14.3L91.26,309.51zM491.17,368.45l-6.17,-17.64l-205.66,71.92l4.03,11.53c-23.35,12.53 -30.19,12.4 -54.75,0l4.03,-11.53l-205.66,-71.92l-0,-0l-6.17,17.64l196.37,68.67l-4.37,12.13c42.19,17.41 42.19,17.41 85.64,-0.14l-4.19,-11.94"/>
<path android:fillColor="@color/ic_launcher_background" android:pathData="M443.34,303.42h0.11h0.17c3.18,-0.03 5.73,-1.29 5.73,-2.83l0,0v-79.71c0,-1.56 -2.66,-2.85 -5.89,-2.85c-3.18,0 -5.78,1.26 -5.84,2.81v79.76C437.63,302.16 440.13,303.4 443.34,303.42z"/>
<path android:fillColor="@color/ic_launcher_background" android:pathData="M422.46,294.14h0.17h0.17c3.15,-0.02 5.7,-1.14 5.7,-2.5l0,0V178.8c0,-1.39 -2.63,-2.51 -5.87,-2.51c-3.21,0 -5.81,1.11 -5.87,2.48V291.66C416.81,293.03 419.33,294.12 422.46,294.14z"/>
<path android:fillColor="@color/ic_launcher_background" android:pathData="M401.64,296.46h0.17h0.17c3.16,-0.03 5.69,-1.4 5.69,-3.08l0,0V151c0,-1.71 -2.61,-3.09 -5.85,-3.09c-3.19,0 -5.85,1.37 -5.88,3.05v142.46C395.96,295.09 398.51,296.43 401.64,296.46z"/>
<path android:fillColor="@color/ic_launcher_background" android:pathData="M380.82,297.39h0.17h0.17c3.11,-0.02 5.7,-1.12 5.7,-2.46l0,0V169.09c0,-1.36 -2.64,-2.47 -5.87,-2.47c-3.17,0 -5.81,1.09 -5.87,2.43v125.9C375.14,296.3 377.68,297.37 380.82,297.39z"/>
<path android:fillColor="@color/ic_launcher_background" android:pathData="M359.99,296.46h0.14h0.17c3.16,-0.02 5.71,-1.18 5.71,-2.59l0,0V98.31c0,-1.44 -2.64,-2.6 -5.88,-2.6c-3.22,0 -5.83,1.14 -5.85,2.56v195.62C354.3,295.31 356.85,296.44 359.99,296.46z"/>
<path android:fillColor="@color/ic_launcher_background" android:pathData="M339.17,296.46h0.17h0.17c3.13,-0.02 5.67,-1.09 5.67,-2.39l0,0V124.48c0,-1.32 -2.63,-2.4 -5.84,-2.4c-3.24,0 -5.84,1.06 -5.89,2.37v169.63C333.5,295.4 336.05,296.44 339.17,296.46z"/>
<path android:fillColor="@color/ic_launcher_background" android:pathData="M318.3,297.39h0.17h0.17c3.18,-0.03 5.73,-1.4 5.73,-3.08l0,0V179.39c0,-1.71 -2.66,-3.1 -5.89,-3.1c-3.18,0 -5.78,1.37 -5.84,3.05v114.99C312.65,296.02 315.17,297.36 318.3,297.39z"/>
<path android:fillColor="@color/ic_launcher_background" android:pathData="M297.5,299.6h0.17h0.17c3.15,-0.02 5.69,-1.15 5.69,-2.53l0,0V91.67c0,-1.41 -2.65,-2.55 -5.85,-2.55s-5.83,1.13 -5.88,2.51v205.45C291.84,298.47 294.38,299.58 297.5,299.6z"/>
<path android:fillColor="@color/ic_launcher_background" android:pathData="M276.66,310.74h0.14h0.17c3.16,-0.03 5.74,-1.28 5.74,-2.82l0,0V51.32c0,-1.56 -2.66,-2.83 -5.91,-2.83c-3.19,0 -5.8,1.26 -5.83,2.79v256.65C270.98,309.48 273.5,310.71 276.66,310.74z"/>
<path android:fillColor="@color/ic_launcher_background" android:pathData="M255.85,329.83h0.14h0.17c3.15,-0.03 5.7,-1.52 5.7,-3.33l0,0v-201.07c0,-1.85 -2.63,-3.35 -5.87,-3.35c-3.21,0 -5.81,1.47 -5.87,3.3v201.15C250.15,328.35 252.69,329.8 255.85,329.83z"/>
<path android:fillColor="@color/ic_launcher_background" android:pathData="M235.03,310.74h0.14h0.17c3.15,-0.03 5.7,-1.28 5.7,-2.8l0,0V76.23c0,-1.56 -2.63,-2.82 -5.87,-2.82c-3.21,0 -5.84,1.24 -5.87,2.78v231.79C229.33,309.49 231.87,310.71 235.03,310.74z"/>
<path android:fillColor="@color/ic_launcher_background" android:pathData="M214.18,299.6h0.17h0.14c3.18,-0.03 5.73,-1.43 5.73,-3.15l0,0V130.75c0,-1.73 -2.66,-3.15 -5.87,-3.15c-3.21,0 -5.84,1.39 -5.87,3.12v165.76C208.51,298.2 211.02,299.57 214.18,299.6z"/>
<path android:fillColor="@color/ic_launcher_background" android:pathData="M193.34,297.39h0.17h0.14c3.18,-0.04 5.73,-1.73 5.73,-3.8l0,0V118.03c0,-2.11 -2.66,-3.81 -5.87,-3.81c-3.21,0 -5.84,1.67 -5.87,3.76v175.65C187.67,295.7 190.22,297.35 193.34,297.39z"/>
<path android:fillColor="@color/ic_launcher_background" android:pathData="M172.53,296.46h0.14h0.17c3.18,-0.03 5.7,-1.39 5.7,-3.06l0,0V150.25c0,-1.7 -2.63,-3.08 -5.87,-3.08c-3.21,0 -5.81,1.36 -5.87,3.05v143.21C166.86,295.1 169.38,296.43 172.53,296.46z"/>
<path android:fillColor="@color/ic_launcher_background" android:pathData="M151.71,296.46h0.14h0.17c3.15,-0.03 5.7,-1.39 5.7,-3.06l0,0V106.77c0,-1.69 -2.63,-3.07 -5.87,-3.07c-3.21,0 -5.81,1.35 -5.87,3.03v186.75C146.04,295.1 148.53,296.43 151.71,296.46z"/>
<path android:fillColor="@color/ic_launcher_background" android:pathData="M130.85,297.39h0.17h0.17c3.15,-0.03 5.7,-1.44 5.7,-3.16l0,0V162.15c0,-1.75 -2.63,-3.17 -5.87,-3.17c-3.21,0 -5.84,1.41 -5.87,3.14v132.14C125.18,295.98 127.72,297.36 130.85,297.39z"/>
<path android:fillColor="@color/ic_launcher_background" android:pathData="M110.03,296.46h0.17h0.14c3.18,-0.03 5.73,-1.4 5.73,-3.08l0,0v-63.11c0,-1.71 -2.66,-3.11 -5.87,-3.11s-5.84,1.37 -5.87,3.06v63.18C104.36,295.09 106.9,296.43 110.03,296.46z"/>
<path android:fillColor="@color/ic_launcher_background" android:pathData="M89.22,294.14h0.14h0.17c3.15,-0.03 5.7,-1.2 5.7,-2.64l0,0V178.93c0,-1.45 -2.63,-2.64 -5.87,-2.64c-3.21,0 -5.81,1.16 -5.87,2.62v112.62C83.52,292.96 86.07,294.12 89.22,294.14z"/>
<path android:fillColor="@color/ic_launcher_background" android:pathData="M62.66,300.1c0.06,1.83 2.57,3.3 5.73,3.33h0.14h0.17c3.15,-0.03 5.7,-1.53 5.7,-3.36l0,0v-43.89c0,-1.86 -2.63,-3.36 -5.87,-3.36c-3.21,0 -5.81,1.5 -5.87,3.33"/>
<path android:fillColor="@color/ic_launcher_foreground" android:pathData="M91.26,309.51l-41.97,29.23l207.34,72.68l207.34,-73.03l-40.99,-28.88c-42.6,7.18 -92.04,-5.54 -126.02,10.35l-0.12,0.05l-0.01,0.01c-5.23,2.37 -9.96,5.42 -14.26,9.38c-7.56,6.77 -13.82,16.05 -18.36,28.69l-7.59,34.86l-7.35,-33.77c-5.43,-15.83 -13.45,-26.5 -23.32,-33.64c-0.16,-0.11 -0.32,-0.22 -0.47,-0.33c-0.63,-0.45 -1.27,-0.88 -1.91,-1.3c-33.56,-21.77 -86.63,-6.6 -132.31,-14.3L91.26,309.51zM491.17,368.45l-6.17,-17.64l-205.66,71.92l4.03,11.53c-23.35,12.53 -30.19,12.4 -54.75,0l4.03,-11.53l-205.66,-71.92l-0,-0l-6.17,17.64l196.37,68.67l-4.37,12.13c42.19,17.41 42.19,17.41 85.64,-0.14l-4.19,-11.94"/>
<path android:fillColor="@color/ic_launcher_foreground" android:pathData="M443.34,303.42h0.11h0.17c3.18,-0.03 5.73,-1.29 5.73,-2.83l0,0v-79.71c0,-1.56 -2.66,-2.85 -5.89,-2.85c-3.18,0 -5.78,1.26 -5.84,2.81v79.76C437.63,302.16 440.13,303.4 443.34,303.42z"/>
<path android:fillColor="@color/ic_launcher_foreground" android:pathData="M422.46,294.14h0.17h0.17c3.15,-0.02 5.7,-1.14 5.7,-2.5l0,0V178.8c0,-1.39 -2.63,-2.51 -5.87,-2.51c-3.21,0 -5.81,1.11 -5.87,2.48V291.66C416.81,293.03 419.33,294.12 422.46,294.14z"/>
<path android:fillColor="@color/ic_launcher_foreground" android:pathData="M401.64,296.46h0.17h0.17c3.16,-0.03 5.69,-1.4 5.69,-3.08l0,0V151c0,-1.71 -2.61,-3.09 -5.85,-3.09c-3.19,0 -5.85,1.37 -5.88,3.05v142.46C395.96,295.09 398.51,296.43 401.64,296.46z"/>
<path android:fillColor="@color/ic_launcher_foreground" android:pathData="M380.82,297.39h0.17h0.17c3.11,-0.02 5.7,-1.12 5.7,-2.46l0,0V169.09c0,-1.36 -2.64,-2.47 -5.87,-2.47c-3.17,0 -5.81,1.09 -5.87,2.43v125.9C375.14,296.3 377.68,297.37 380.82,297.39z"/>
<path android:fillColor="@color/ic_launcher_foreground" android:pathData="M359.99,296.46h0.14h0.17c3.16,-0.02 5.71,-1.18 5.71,-2.59l0,0V98.31c0,-1.44 -2.64,-2.6 -5.88,-2.6c-3.22,0 -5.83,1.14 -5.85,2.56v195.62C354.3,295.31 356.85,296.44 359.99,296.46z"/>
<path android:fillColor="@color/ic_launcher_foreground" android:pathData="M339.17,296.46h0.17h0.17c3.13,-0.02 5.67,-1.09 5.67,-2.39l0,0V124.48c0,-1.32 -2.63,-2.4 -5.84,-2.4c-3.24,0 -5.84,1.06 -5.89,2.37v169.63C333.5,295.4 336.05,296.44 339.17,296.46z"/>
<path android:fillColor="@color/ic_launcher_foreground" android:pathData="M318.3,297.39h0.17h0.17c3.18,-0.03 5.73,-1.4 5.73,-3.08l0,0V179.39c0,-1.71 -2.66,-3.1 -5.89,-3.1c-3.18,0 -5.78,1.37 -5.84,3.05v114.99C312.65,296.02 315.17,297.36 318.3,297.39z"/>
<path android:fillColor="@color/ic_launcher_foreground" android:pathData="M297.5,299.6h0.17h0.17c3.15,-0.02 5.69,-1.15 5.69,-2.53l0,0V91.67c0,-1.41 -2.65,-2.55 -5.85,-2.55s-5.83,1.13 -5.88,2.51v205.45C291.84,298.47 294.38,299.58 297.5,299.6z"/>
<path android:fillColor="@color/ic_launcher_foreground" android:pathData="M276.66,310.74h0.14h0.17c3.16,-0.03 5.74,-1.28 5.74,-2.82l0,0V51.32c0,-1.56 -2.66,-2.83 -5.91,-2.83c-3.19,0 -5.8,1.26 -5.83,2.79v256.65C270.98,309.48 273.5,310.71 276.66,310.74z"/>
<path android:fillColor="@color/ic_launcher_foreground" android:pathData="M255.85,329.83h0.14h0.17c3.15,-0.03 5.7,-1.52 5.7,-3.33l0,0v-201.07c0,-1.85 -2.63,-3.35 -5.87,-3.35c-3.21,0 -5.81,1.47 -5.87,3.3v201.15C250.15,328.35 252.69,329.8 255.85,329.83z"/>
<path android:fillColor="@color/ic_launcher_foreground" android:pathData="M235.03,310.74h0.14h0.17c3.15,-0.03 5.7,-1.28 5.7,-2.8l0,0V76.23c0,-1.56 -2.63,-2.82 -5.87,-2.82c-3.21,0 -5.84,1.24 -5.87,2.78v231.79C229.33,309.49 231.87,310.71 235.03,310.74z"/>
<path android:fillColor="@color/ic_launcher_foreground" android:pathData="M214.18,299.6h0.17h0.14c3.18,-0.03 5.73,-1.43 5.73,-3.15l0,0V130.75c0,-1.73 -2.66,-3.15 -5.87,-3.15c-3.21,0 -5.84,1.39 -5.87,3.12v165.76C208.51,298.2 211.02,299.57 214.18,299.6z"/>
<path android:fillColor="@color/ic_launcher_foreground" android:pathData="M193.34,297.39h0.17h0.14c3.18,-0.04 5.73,-1.73 5.73,-3.8l0,0V118.03c0,-2.11 -2.66,-3.81 -5.87,-3.81c-3.21,0 -5.84,1.67 -5.87,3.76v175.65C187.67,295.7 190.22,297.35 193.34,297.39z"/>
<path android:fillColor="@color/ic_launcher_foreground" android:pathData="M172.53,296.46h0.14h0.17c3.18,-0.03 5.7,-1.39 5.7,-3.06l0,0V150.25c0,-1.7 -2.63,-3.08 -5.87,-3.08c-3.21,0 -5.81,1.36 -5.87,3.05v143.21C166.86,295.1 169.38,296.43 172.53,296.46z"/>
<path android:fillColor="@color/ic_launcher_foreground" android:pathData="M151.71,296.46h0.14h0.17c3.15,-0.03 5.7,-1.39 5.7,-3.06l0,0V106.77c0,-1.69 -2.63,-3.07 -5.87,-3.07c-3.21,0 -5.81,1.35 -5.87,3.03v186.75C146.04,295.1 148.53,296.43 151.71,296.46z"/>
<path android:fillColor="@color/ic_launcher_foreground" android:pathData="M130.85,297.39h0.17h0.17c3.15,-0.03 5.7,-1.44 5.7,-3.16l0,0V162.15c0,-1.75 -2.63,-3.17 -5.87,-3.17c-3.21,0 -5.84,1.41 -5.87,3.14v132.14C125.18,295.98 127.72,297.36 130.85,297.39z"/>
<path android:fillColor="@color/ic_launcher_foreground" android:pathData="M110.03,296.46h0.17h0.14c3.18,-0.03 5.73,-1.4 5.73,-3.08l0,0v-63.11c0,-1.71 -2.66,-3.11 -5.87,-3.11s-5.84,1.37 -5.87,3.06v63.18C104.36,295.09 106.9,296.43 110.03,296.46z"/>
<path android:fillColor="@color/ic_launcher_foreground" android:pathData="M89.22,294.14h0.14h0.17c3.15,-0.03 5.7,-1.2 5.7,-2.64l0,0V178.93c0,-1.45 -2.63,-2.64 -5.87,-2.64c-3.21,0 -5.81,1.16 -5.87,2.62v112.62C83.52,292.96 86.07,294.12 89.22,294.14z"/>
<path android:fillColor="@color/ic_launcher_foreground" android:pathData="M62.66,300.1c0.06,1.83 2.57,3.3 5.73,3.33h0.14h0.17c3.15,-0.03 5.7,-1.53 5.7,-3.36l0,0v-43.89c0,-1.86 -2.63,-3.36 -5.87,-3.36c-3.21,0 -5.81,1.5 -5.87,3.33"/>
</group>
</vector>
5 changes: 4 additions & 1 deletion app/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@
<color name="ic_shortcut_play_background">#FFFFFF</color>

<!-- PlayBook -->
<color name="ic_launcher_background">#1B2529</color> <!-- TODO Lite -->
<color name="ic_launcher_background_start">#FF5722</color> <!-- Deep Orange -->
<color name="ic_launcher_background_end">#BF360C</color> <!-- Darker Deep Orange -->
<color name="ic_launcher_background">#FF5722</color> <!-- Fallback / Base -->

<color name="ic_launcher_foreground">#E6E6E6</color> <!-- TODO Lite -->
<color name="ic_splash_background">#000000</color>
<color name="copy_primary_text_disabled_material_light">#4D000000</color>
Expand Down
5 changes: 0 additions & 5 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
plugins {
alias(libs.plugins.kotlin.android) apply false
alias(libs.plugins.kotlin.jvm) apply false
alias(libs.plugins.android.app) apply false
alias(libs.plugins.android.library) apply false
alias(libs.plugins.compose.compiler) apply false
id("voice.ktlint")
}

Expand Down
46 changes: 46 additions & 0 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
plugins {
`kotlin-dsl`
}

// Add a repository for these dependencies if not already inherited
// For buildSrc, it's good practice to define repositories explicitly.
repositories {
mavenCentral()
google()
gradlePluginPortal()
}

dependencies {
implementation("com.android.tools.build:gradle:8.13.0") // androidPluginForGradle
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:2.1.10") // kotlin.pluginForGradle
compileOnly("org.jetbrains.kotlin:kotlin-compiler-embeddable:2.1.10") // kotlin.compilerEmbeddable
implementation("io.github.usefulness:ktlint-gradle-plugin:0.10.0") // ktlint.gradlePlugin
implementation("org.jetbrains.kotlin:compose-compiler-gradle-plugin:2.1.10")}

gradlePlugin {
plugins {
create("library") {
id = "voice.library"
implementationClass = "LibraryPlugin"
}
create("app") {
id = "voice.app"
implementationClass = "AppPlugin"
}
create("compose") {
id = "voice.compose"
implementationClass = "ComposePlugin"
}
create("ktlint") {
id = "voice.ktlint"
implementationClass = "KtlintPlugin"
}
}
}

kotlin {
jvmToolchain {
// Ensure JavaLanguageVersion is imported or use the fully qualified name
languageVersion.set(org.gradle.jvm.toolchain.JavaLanguageVersion.of(17))
}
}
38 changes: 38 additions & 0 deletions buildSrc/src/main/kotlin/LibraryPlugin.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import com.android.build.gradle.LibraryExtension
import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.api.artifacts.VersionCatalogsExtension
import org.gradle.kotlin.dsl.configure // Required for the configure<T> syntax

class LibraryPlugin : Plugin<Project> {

override fun apply(target: Project) {
target.pluginManager.apply("com.android.library")
target.pluginManager.apply("kotlin-android")
target.pluginManager.apply("voice.ktlint")

// Access the version catalog
val libs = target.extensions.getByType(VersionCatalogsExtension::class.java).named("libs")
val minSdkVer = libs.findVersion("sdk-min").get().requiredVersion.toInt()
val compileSdkVer = libs.findVersion("sdk-compile").get().requiredVersion.toInt()

// Configure the LibraryExtension. This block will execute once the extension is available.
target.extensions.configure<LibraryExtension> {
namespace = "voice." + target.path.removePrefix(":").replace(':', '.')
this.compileSdk = compileSdkVer // Use this.compileSdk to be explicit about the receiver

defaultConfig {
this.minSdk = minSdkVer // Use this.minSdk
// targetSdk will typically default based on compileSdk or can be set explicitly if needed
}
}

// The rest of your setup, which might re-apply or further configure these settings
target.pluginManager.withPlugin("com.android.library") {
target.baseSetup() // baseSetup() will re-apply/override some settings, which is fine.
target.tasks.register("voiceUnitTest") {
dependsOn("testDebugUnitTest")
}
}
}
}
4 changes: 2 additions & 2 deletions common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ anvil {
}

android {
buildFeatures {
androidResources = true
androidResources {
enable = true
}
}

Expand Down
55 changes: 54 additions & 1 deletion ffmpeg/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,8 +1,61 @@
import java.net.URI
import java.io.FileOutputStream

plugins {
id("voice.library")
}

val ffmpegFileName = "ffmpeg-kit-full-gpl-6.0-2.LTS.aar"
// Use build directory instead of source libs directory
val ffmpegAarFile = layout.buildDirectory.file("downloaded-libs/$ffmpegFileName")
val ffmpegDownloadUrl = "https://artifactory.appodeal.com/appodeal-public/com/arthenica/ffmpeg-kit-full-gpl/6.0-2.LTS/ffmpeg-kit-full-gpl-6.0-2.LTS.aar"

abstract class DownloadFfmpeg : DefaultTask() {
@get:Input
abstract val downloadUrl: Property<String>

@get:OutputFile
abstract val outputFile: RegularFileProperty

@TaskAction
fun download() {
val url = downloadUrl.get()
val file = outputFile.get().asFile

println("Downloading FFmpeg to: ${file.absolutePath}")

file.parentFile.mkdirs()
if (file.exists()) file.delete()

try {
URI(url).toURL().openStream().use { input ->
FileOutputStream(file).use { output ->
input.copyTo(output)
}
}
println("Download complete. Size: ${file.length()}")
} catch (e: Exception) {
throw GradleException("Download failed", e)
}
}
}

val downloadTask = tasks.register<DownloadFfmpeg>("downloadFfmpeg") {
group = "download"
downloadUrl.set(ffmpegDownloadUrl)
outputFile.set(ffmpegAarFile)
outputs.upToDateWhen { outputFile.get().asFile.exists() }
}

// Make sure preBuild waits for this
tasks.named("preBuild").configure {
dependsOn(downloadTask)
}

dependencies {
implementation(libs.ffmpeg)
// Use the task provider to ensure dependency is lazy and triggers the task
compileOnly(files(downloadTask))

api("com.arthenica:smart-exception-java:0.2.1")
implementation(libs.androidxCore)
}
6 changes: 5 additions & 1 deletion folderPicker/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ anvil {
generateDaggerFactories.set(true)
}

android.buildFeatures.androidResources = true
android {
androidResources {
enable = true
}
}

dependencies {
implementation(projects.common)
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ org.gradle.parallel=true
org.gradle.configuration-cache=true
kotlin.daemon.useFallbackStrategy=false
org.gradle.kotlin.dsl.allWarningsAsErrors=true
org.gradle.jvmargs=-Xmx2048M -Dkotlin.daemon.jvm.options\="-Xmx2048M"
org.gradle.jvmargs=-Xmx4096M -Dkotlin.daemon.jvm.options\="-Xmx4096M"
Loading