diff --git a/.github/workflows/gradle-publish.yml b/.github/workflows/gradle-publish.yml index 0b582f6..e9dde34 100644 --- a/.github/workflows/gradle-publish.yml +++ b/.github/workflows/gradle-publish.yml @@ -10,7 +10,7 @@ on: env: ANDROID_HOME: /usr/local/lib/android/sdk/ - APK_PATH: app/build/outputs/apk/release/Radio.apk + APK_PATH: app/build/outputs/apk/release/app-release.apk APKSIGNER: /usr/local/lib/android/sdk/build-tools/34.0.0/apksigner ZIPALIGN: /usr/local/lib/android/sdk/build-tools/34.0.0/zipalign @@ -31,15 +31,12 @@ jobs: cache: gradle - name: Cache Android SDK - #id: cache-android-sdk uses: actions/cache@v5 with: path: ${{ env.ANDROID_HOME }} key: ${{ runner.os }}-android-sdk - name: Setup Android SDK - ## It is not necessary to check for cache hit as it - ## will not download Android SDK again #if: steps.cache-android-sdk.outputs.cache-hit != 'true' uses: android-actions/setup-android@v4 with: @@ -67,10 +64,10 @@ jobs: echo "$SIGN_KEY" | base64 -d > key.der ${{ env.APKSIGNER }} sign --key key.der --cert cert.der app-release-aligned.apk rm cert.der key.der - mv app-release-aligned.apk app-release.apk + mv app-release-aligned.apk Radio.apk - name: Upload artifact uses: actions/upload-artifact@v7 with: - name: app-release - path: app-release.apk + name: Radio + path: Radio.apk diff --git a/app/build.gradle b/app/build.gradle deleted file mode 100644 index 1bae455..0000000 --- a/app/build.gradle +++ /dev/null @@ -1,95 +0,0 @@ -plugins { - alias libs.plugins.android.application - id 'kotlin-parcelize' -} - -androidComponents { - onVariants(selector().all()) { variant -> - variant.outputs.forEach { output -> - output.outputFileName.set("Radio.apk") - } - } -} - -android { - namespace 'com.michatec.radio' - compileSdk 36 - - defaultConfig { - applicationId 'com.michatec.radio' - minSdk 28 - targetSdk 36 - versionCode 145 - versionName '14.5' - resourceConfigurations += ['en', 'de', 'el', 'nl', 'pl', 'ru','uk', 'ja', 'da', 'fr'] - externalNativeBuild { - cmake { - cppFlags '' - } - } - } - - compileOptions { - sourceCompatibility JavaVersion.VERSION_17 - targetCompatibility JavaVersion.VERSION_17 - } - - buildFeatures { - buildConfig true - } - - buildTypes { - debug { - minifyEnabled false - shrinkResources false - crunchPngs false - proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' - applicationIdSuffix = ".debug" - } - - release { - minifyEnabled true - shrinkResources true - crunchPngs true - proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' - } - } - ndkVersion "29.0.14206865" - externalNativeBuild { - cmake { - path file('src/main/cpp/CMakeLists.txt') - version '3.22.1' - } - } -} - -dependencies { - implementation fileTree(dir: 'libs', include: ['*.jar']) - - // Google Stuff // - implementation libs.material - implementation libs.gson - implementation libs.play.services.cast.framework - - // AndroidX Stuff // - implementation libs.core.ktx - implementation libs.activity.ktx - implementation libs.palette.ktx - implementation libs.preference.ktx - implementation libs.media - implementation libs.media3.exoplayer - implementation libs.media3.exoplayer.hls - implementation libs.media3.session - implementation libs.media3.cast - implementation libs.media3.datasource.okhttp - implementation libs.navigation.fragment.ktx - implementation libs.navigation.ui.ktx - implementation libs.work.runtime.ktx - implementation libs.leanback - - implementation libs.freedroidwarn - - // Volley HTTP request // - implementation libs.volley - implementation libs.material3 -} diff --git a/app/build.gradle.kts b/app/build.gradle.kts new file mode 100644 index 0000000..1ed2b69 --- /dev/null +++ b/app/build.gradle.kts @@ -0,0 +1,81 @@ +plugins { + alias(libs.plugins.android.application) + id("kotlin-parcelize") +} + +android { + namespace = "com.michatec.radio" + compileSdk = 36 + + defaultConfig { + applicationId = "com.michatec.radio" + minSdk = 28 + targetSdk = 36 + versionCode = 145 + versionName = "14.5" + } + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 + } + + buildFeatures { + buildConfig = true + } + + buildTypes { + debug { + isMinifyEnabled = false + isShrinkResources = false + isCrunchPngs = false + proguardFiles.addAll(listOf(getDefaultProguardFile("proguard-android-optimize.txt"), file("proguard-rules.pro"))) + applicationIdSuffix = ".debug" + } + + release { + isMinifyEnabled = true + isShrinkResources = true + isCrunchPngs = true + proguardFiles.addAll(listOf(getDefaultProguardFile("proguard-android-optimize.txt"), file("proguard-rules.pro"))) + } + } + + ndkVersion = "29.0.14206865" + + externalNativeBuild { + cmake { + path = file("src/main/cpp/CMakeLists.txt") + version = "3.22.1" + } + } +} + +dependencies { + // Google Stuff // + implementation(libs.material) + implementation(libs.gson) + implementation(libs.play.services.cast.framework) + + // AndroidX Stuff // + implementation(libs.core.ktx) + implementation(libs.activity.ktx) + implementation(libs.palette.ktx) + implementation(libs.preference.ktx) + implementation(libs.media) + implementation(libs.media3.exoplayer) + implementation(libs.media3.exoplayer.hls) + implementation(libs.media3.session) + implementation(libs.media3.cast) + implementation(libs.media3.datasource.okhttp) + implementation(libs.navigation.fragment.ktx) + implementation(libs.navigation.ui.ktx) + implementation(libs.work.runtime.ktx) + implementation(libs.leanback) + + implementation(libs.freedroidwarn) + + // Volley HTTP request // + implementation(libs.volley) + implementation(libs.material3) +} \ No newline at end of file diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index cf6209e..32eb3e1 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -1,6 +1,6 @@ # Add project specific ProGuard rules here. # You can control the set of applied configuration files using the -# proguardFiles setting in build.gradle. +# proguardFiles setting in build.gradle.kts. # # For more details, see # http://developer.android.com/guide/developing/tools/proguard.html diff --git a/build.gradle b/build.gradle deleted file mode 100644 index c8771d2..0000000 --- a/build.gradle +++ /dev/null @@ -1,11 +0,0 @@ -// Top-level build file where you can add configuration options common to all sub-projects/modules. - -plugins { - alias libs.plugins.android.application apply false - alias libs.plugins.android.library apply false - alias libs.plugins.jetbrains.kotlin.android apply false -} - -tasks.register('clean', Delete) { - delete layout.buildDirectory -} diff --git a/build.gradle.kts b/build.gradle.kts new file mode 100644 index 0000000..650369a --- /dev/null +++ b/build.gradle.kts @@ -0,0 +1,11 @@ +// Top-level build file where you can add configuration options common to all subprojects/modules. + +plugins { + alias(libs.plugins.android.application) apply false + alias(libs.plugins.android.library) apply false + alias(libs.plugins.jetbrains.kotlin.android) apply false +} + +tasks.register("clean") { + delete(layout.buildDirectory) +} \ No newline at end of file diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index b177860..d00dab4 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -15,7 +15,7 @@ paletteKtx = "1.0.0" preferenceKtx = "1.2.1" volley = "1.2.1" workRuntimeKtx = "2.11.2" -playServicesCastFramework = "22.3.0" +playServicesCastFramework = "22.3.1" [libraries] activity-ktx = { group = "androidx.activity", name = "activity-ktx", version.ref = "activityKtx" } diff --git a/settings.gradle b/settings.gradle.kts similarity index 56% rename from settings.gradle rename to settings.gradle.kts index 0b90ac3..46316dd 100644 --- a/settings.gradle +++ b/settings.gradle.kts @@ -3,20 +3,22 @@ pluginManagement { google() mavenCentral() gradlePluginPortal() - maven { url 'https://jitpack.io' } + maven { url = uri("https://jitpack.io") } } } -plugins { - id 'org.gradle.toolchains.foojay-resolver-convention' version '1.0.0' -} +@Suppress("UnstableApiUsage") dependencyResolutionManagement { repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) repositories { google() mavenCentral() - maven { url 'https://jitpack.io' } + maven { url = uri("https://jitpack.io") } } } -include ':app' +plugins { + id("org.gradle.toolchains.foojay-resolver-convention") version "1.0.0" +} + +include(":app")