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
8 changes: 8 additions & 0 deletions .github/workflows/MediaInfo-Android_Checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@ jobs:
uses: actions/checkout@v6
with:
path: MediaInfo
- name: Run static analysis
run: |
export JAVA_HOME="$JAVA_HOME_${{ env.JAVA_VER }}_X64"
pushd ${{ github.workspace }}/MediaInfo/Source/GUI/Android
chmod +x gradlew
./gradlew detektDebug
popd
- name: Build APKs
run: |
export JAVA_HOME="$JAVA_HOME_${{ env.JAVA_VER }}_X64"
Expand All @@ -58,3 +65,4 @@ jobs:
curl "https://android.googlesource.com/platform/system/extras/+/main/tools/check_elf_alignment.sh?format=TEXT"| base64 --decode > check_elf_alignment.sh
chmod +x check_elf_alignment.sh
./check_elf_alignment.sh ${{ github.workspace }}/MediaInfo/Source/GUI/Android/app/build/outputs/apk/release/app-universal-release-unsigned.apk
./check_elf_alignment.sh ${{ github.workspace }}/MediaInfo/Source/GUI/Android/tvapp/build/outputs/apk/release/tvapp-universal-release-unsigned.apk
40 changes: 3 additions & 37 deletions Source/GUI/Android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,42 +16,13 @@ android {
applicationId "net.mediaarea.mediainfo"
multiDexEnabled = true
minSdkVersion 21
versionCode 57
versionName "26.01"
versionCode 56
versionName "25.10"
targetSdkVersion 36
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
useSupportLibrary = true
}
externalNativeBuild {
cmake {
arguments "-DANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES=ON",
"-DENABLE_UNICODE=ON",
"-DMEDIAINFO_ADVANCED=OFF",
"-DMEDIAINFO_AES=OFF",
"-DMEDIAINFO_DEMUX=OFF",
"-DMEDIAINFO_DIRECTORY=OFF",
"-DMEDIAINFO_DUPLICATE=OFF",
"-DMEDIAINFO_DVDIF_ANALYZE=OFF",
"-DMEDIAINFO_EVENTS=OFF",
"-DMEDIAINFO_FILTER=OFF",
"-DMEDIAINFO_FIXITY=OFF",
"-DMEDIAINFO_GRAPH=OFF",
"-DMEDIAINFO_IBI=OFF",
"-DMEDIAINFO_LIBCURL=OFF",
"-DMEDIAINFO_LIBMMS=OFF",
"-DMEDIAINFO_MACROBLOCKS=OFF",
"-DMEDIAINFO_MD5=OFF",
"-DMEDIAINFO_NEXTPACKET=OFF",
"-DMEDIAINFO_READER=OFF",
"-DMEDIAINFO_READTHREAD=OFF",
"-DMEDIAINFO_REFERENCES=OFF",
"-DMEDIAINFO_SHA1=OFF",
"-DMEDIAINFO_SHA2=OFF",
"-DMEDIAINFO_TRACE=OFF",
"-DMEDIAINFO_TRACE_FFV1CONTENT=OFF"
}
}
splits {
abi {
reset()
Expand Down Expand Up @@ -79,11 +50,6 @@ android {
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
externalNativeBuild {
cmake {
path "CMakeLists.txt"
}
}
splits {
abi {
def isBuildingBundle = gradle.startParameter.taskNames.any { it.toLowerCase().contains('bundle') }
Expand Down Expand Up @@ -202,7 +168,7 @@ tasks.register('copyLocales', DefaultTask) {
preBuild.dependsOn copyLocales

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation project(':mediainfolib')
implementation 'androidx.multidex:multidex:2.0.1'
implementation 'com.google.android.material:material:1.13.0'
implementation 'androidx.appcompat:appcompat:1.7.1'
Expand Down
7 changes: 1 addition & 6 deletions Source/GUI/Android/app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,4 @@

# Uncomment this to preserve the line number information for
# debugging stack traces.
-keepattributes SourceFile,LineNumberTable

# MediaInfo
-keepclassmembers class net.mediaarea.mediainfo.MediaInfo {
*;
}
-keepattributes SourceFile,LineNumberTable
1 change: 1 addition & 0 deletions Source/GUI/Android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ buildscript {

plugins {
id 'com.google.devtools.ksp' version "$kotlin_version-2.0.4" apply false
id 'org.jetbrains.kotlin.plugin.compose' version "$kotlin_version" apply false
}

allprojects {
Expand Down
1 change: 1 addition & 0 deletions Source/GUI/Android/mediainfolib/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
80 changes: 80 additions & 0 deletions Source/GUI/Android/mediainfolib/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
import org.jetbrains.kotlin.gradle.dsl.JvmTarget

plugins {
id("com.android.library")
id("org.jetbrains.kotlin.android")
}

android {
namespace = "net.mediaarea.mediainfo.lib"
compileSdk {
version = release(36)
}

defaultConfig {
minSdk = 21

@Suppress("UnstableApiUsage")
externalNativeBuild {
cmake {
arguments(
"-DANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES=ON",
"-DENABLE_UNICODE=ON",
"-DMEDIAINFO_ADVANCED=OFF",
"-DMEDIAINFO_AES=OFF",
"-DMEDIAINFO_DEMUX=OFF",
"-DMEDIAINFO_DIRECTORY=OFF",
"-DMEDIAINFO_DUPLICATE=OFF",
"-DMEDIAINFO_DVDIF_ANALYZE=OFF",
"-DMEDIAINFO_EVENTS=OFF",
"-DMEDIAINFO_FILTER=OFF",
"-DMEDIAINFO_FIXITY=OFF",
"-DMEDIAINFO_GRAPH=OFF",
"-DMEDIAINFO_IBI=OFF",
"-DMEDIAINFO_LIBCURL=OFF",
"-DMEDIAINFO_LIBMMS=OFF",
"-DMEDIAINFO_MACROBLOCKS=OFF",
"-DMEDIAINFO_MD5=OFF",
"-DMEDIAINFO_NEXTPACKET=OFF",
"-DMEDIAINFO_READER=OFF",
"-DMEDIAINFO_READTHREAD=OFF",
"-DMEDIAINFO_REFERENCES=OFF",
"-DMEDIAINFO_SHA1=OFF",
"-DMEDIAINFO_SHA2=OFF",
"-DMEDIAINFO_TRACE=OFF",
"-DMEDIAINFO_TRACE_FFV1CONTENT=OFF"
)
}
}

consumerProguardFiles("consumer-rules.pro")
}

externalNativeBuild {
cmake {
path = file("CMakeLists.txt")
}
}
buildTypes {
release {
isMinifyEnabled = false
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}
kotlin {
compilerOptions {
jvmTarget = JvmTarget.JVM_21
}
}
}

dependencies {

}
3 changes: 3 additions & 0 deletions Source/GUI/Android/mediainfolib/consumer-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
-keepclassmembers class net.mediaarea.mediainfo.MediaInfo {
*;
}
21 changes: 21 additions & 0 deletions Source/GUI/Android/mediainfolib/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
4 changes: 4 additions & 0 deletions Source/GUI/Android/mediainfolib/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

</manifest>
2 changes: 2 additions & 0 deletions Source/GUI/Android/settings.gradle
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
include ':app'
include ':tvapp'
include ':mediainfolib'
1 change: 1 addition & 0 deletions Source/GUI/Android/tvapp/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
107 changes: 107 additions & 0 deletions Source/GUI/Android/tvapp/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
import org.jetbrains.kotlin.gradle.dsl.JvmTarget

plugins {
id("com.android.application")
id("org.jetbrains.kotlin.android")
id("org.jetbrains.kotlin.plugin.compose")
id("dev.detekt") version "latest.release"
}

android {
namespace = "net.mediaarea.mediainfo.tv"
compileSdk {
version = release(36)
}

defaultConfig {
applicationId = "net.mediaarea.mediainfo.tv"
minSdk = 23
targetSdk = 36
versionCode = 1
versionName = "25.10"

splits {
abi {
reset()
include("x86", "x86_64", "armeabi-v7a", "arm64-v8a")
}
}

if (project.hasProperty("RELEASE_STORE_FILE")) {
signingConfigs {
create("release") {
storeFile = file(project.property("RELEASE_STORE_FILE") as String)
storePassword = project.property("RELEASE_STORE_PASSWORD") as String
keyAlias = project.property("RELEASE_KEY_ALIAS") as String
keyPassword = project.property("RELEASE_KEY_PASSWORD") as String
}
}
}
}

buildTypes {
release {
if (project.hasProperty("RELEASE_STORE_FILE")) {
signingConfig = signingConfigs.getByName("release")
}
isMinifyEnabled = true
isShrinkResources = true
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
}
}
val isBuildingBundle = gradle.startParameter.taskNames.any {
it.contains("bundle", ignoreCase = true)
}
splits {
abi {
isEnable = !isBuildingBundle
isUniversalApk = true
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}
kotlin {
compilerOptions {
jvmTarget = JvmTarget.JVM_21
}
}
buildFeatures {
buildConfig = true
compose = true
}
}

detekt {
parallel = true
buildUponDefaultConfig = true
config.setFrom("detekt-config.yml")
}

dependencies {
implementation(project(":mediainfolib"))
implementation("androidx.core:core-ktx:1.18.0")
implementation("androidx.appcompat:appcompat:1.7.1")
implementation(platform("androidx.compose:compose-bom:2026.03.00"))
implementation("androidx.compose.material:material-icons-extended")
implementation("androidx.compose.material3:material3")
implementation("androidx.compose.ui:ui")
implementation("androidx.compose.ui:ui-graphics")
implementation("androidx.compose.ui:ui-tooling-preview")
implementation("androidx.datastore:datastore-preferences:1.2.1")
implementation("androidx.tv:tv-foundation:1.0.0-beta01")
implementation("androidx.tv:tv-material:1.0.1")
implementation("androidx.lifecycle:lifecycle-process:2.10.0")
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.10.0")
implementation("androidx.activity:activity-compose:1.13.0")
implementation("androidx.navigation:navigation-compose:2.9.7")
implementation("com.google.accompanist:accompanist-permissions:0.37.3")
androidTestImplementation(platform("androidx.compose:compose-bom:2026.03.00"))
androidTestImplementation("androidx.compose.ui:ui-test-junit4")
debugImplementation("androidx.compose.ui:ui-tooling")
debugImplementation("androidx.compose.ui:ui-test-manifest")
}
19 changes: 19 additions & 0 deletions Source/GUI/Android/tvapp/detekt-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
naming:
FunctionNaming:
ignoreAnnotated: ['Composable']
potential-bugs:
Deprecation:
active: true
style:
MagicNumber:
excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/androidUnitTest/**', '**/androidInstrumentedTest/**', '**/jsTest/**', '**/iosTest/**', '**/*.kts', '**/ui/theme/Color.kt']
ignoreNumbers:
- '-1'
- '0'
- '1'
- '2'
- '0.6f'
UnusedImport:
active: true
UnusedPrivateFunction:
ignoreAnnotated: ['Preview']
21 changes: 21 additions & 0 deletions Source/GUI/Android/tvapp/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
Loading
Loading