From 6f3943cdb5902433fac97d29f1d3f42333e7144a Mon Sep 17 00:00:00 2001 From: Niels van Velzen Date: Sun, 8 Aug 2021 17:28:56 +0200 Subject: [PATCH] Add (empty) playback module and CODEOWNERS (#1072) * Add (empty) playback module * Add CODEOWNERS file --- CODEOWNERS | 15 +++++++++++++++ app/build.gradle.kts | 3 ++- buildSrc/src/main/kotlin/VersionUtils.kt | 2 +- playback/build.gradle.kts | 24 ++++++++++++++++++++++++ playback/src/main/AndroidManifest.xml | 7 +++++++ settings.gradle.kts | 3 +++ 6 files changed, 52 insertions(+), 2 deletions(-) create mode 100644 CODEOWNERS create mode 100644 playback/build.gradle.kts create mode 100644 playback/src/main/AndroidManifest.xml diff --git a/CODEOWNERS b/CODEOWNERS new file mode 100644 index 0000000000..e7be02e88b --- /dev/null +++ b/CODEOWNERS @@ -0,0 +1,15 @@ +# Build files +/.github/workflows/ @nielsvanvelzen +/.github/dependabot.yml @nielsvanvelzen +/gradle/ @nielsvanvelzen +/buildSrc/ @nielsvanvelzen +settings.gradle.ts @nielsvanvelzen +build.gradle.kts @nielsvanvelzen +gradle.properties @nielsvanvelzen + +# Linting +android-lint.xml @nielsvanvelzen +detekt.yaml @nielsvanvelzen + +# Playback code +/playback/ @nielsvanvelzen diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 5e3e54e3d6..bac13f8fbd 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -71,7 +71,8 @@ val versionTxt by tasks.registering { } dependencies { - // Jellyfin apiclient & SDK + // Jellyfin + implementation(projects.playback) implementation(libs.jellyfin.apiclient) implementation(libs.jellyfin.sdk) { // Change version if desired diff --git a/buildSrc/src/main/kotlin/VersionUtils.kt b/buildSrc/src/main/kotlin/VersionUtils.kt index afaec6a008..d30b75b0fc 100644 --- a/buildSrc/src/main/kotlin/VersionUtils.kt +++ b/buildSrc/src/main/kotlin/VersionUtils.kt @@ -31,7 +31,7 @@ fun Project.getVersionName(fallback: String = "0.0.0-dev.1") = * 2.0.0 -> 2000099 * 99.99.99-rc.1 -> 99999901 */ -fun getVersionCode(versionName: String): Int? { +fun getVersionCode(versionName: String): Int { // Split to core and pre release parts with a default for pre release (null) val (versionCore, versionPreRelease) = when (val index = versionName.indexOf('-')) { diff --git a/playback/build.gradle.kts b/playback/build.gradle.kts new file mode 100644 index 0000000000..00756d2964 --- /dev/null +++ b/playback/build.gradle.kts @@ -0,0 +1,24 @@ +plugins { + id("com.android.library") + kotlin("android") +} + +android { + compileSdkVersion(30) + + defaultConfig { + minSdkVersion(21) + targetSdkVersion(30) + } + + buildFeatures { + viewBinding = true + } + + sourceSets["main"].java.srcDirs("src/main/kotlin") + sourceSets["test"].java.srcDirs("src/test/kotlin") +} + +dependencies { + +} diff --git a/playback/src/main/AndroidManifest.xml b/playback/src/main/AndroidManifest.xml new file mode 100644 index 0000000000..522334adb0 --- /dev/null +++ b/playback/src/main/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + + + diff --git a/settings.gradle.kts b/settings.gradle.kts index 99e7dc0175..b932421e7a 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -3,3 +3,6 @@ enableFeaturePreview("VERSION_CATALOGS") // Application include(":app") + +// Modules +include(":playback")