diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 72cca1524..bd81a117f 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -130,6 +130,8 @@ android { compose = true } + dynamicFeatures += setOf(":instant") + composeOptions { kotlinCompilerExtensionVersion = libs.versions.androidx.compose.compiler.get() } diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 3ea65a9cc..cc7fa80c8 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -1,14 +1,17 @@ - + + + + - @@ -25,8 +28,7 @@ android:localeConfig="@xml/locale_config" android:roundIcon="@mipmap/ic_launcher" android:supportsRtl="true" - android:theme="@style/Theme.Movies.Starting" - tools:ignore="UnusedAttribute"> + android:theme="@style/Theme.Movies.Starting"> - + + + - + @@ -65,7 +74,8 @@ - + diff --git a/benchmark/src/main/java/org/michaelbel/movies/benchmark/BaselineProfileGenerator.kt b/benchmark/src/main/java/org/michaelbel/movies/benchmark/BaselineProfileGenerator.kt index 12e8a7713..708a5e4a9 100644 --- a/benchmark/src/main/java/org/michaelbel/movies/benchmark/BaselineProfileGenerator.kt +++ b/benchmark/src/main/java/org/michaelbel/movies/benchmark/BaselineProfileGenerator.kt @@ -1,13 +1,9 @@ package org.michaelbel.movies.benchmark -import androidx.benchmark.macro.junit4.BaselineProfileRule -import org.junit.Rule -import org.junit.Test - /** * ./gradlew :benchmark:connectedCheck */ -internal class BaselineProfileGenerator { +/*internal class BaselineProfileGenerator { @get:Rule val baselineProfileRule = BaselineProfileRule() @@ -21,4 +17,4 @@ internal class BaselineProfileGenerator { startActivityAndWait() device.waitForIdle() } -} \ No newline at end of file +}*/ \ No newline at end of file diff --git a/build.gradle.kts b/build.gradle.kts index cf6978d11..2ab15ee04 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,6 +1,7 @@ plugins { alias(libs.plugins.application) apply false alias(libs.plugins.library) apply false + alias(libs.plugins.dynamic.feature) apply false alias(libs.plugins.test) apply false alias(libs.plugins.kotlin) apply false alias(libs.plugins.kotlin.ksp) apply false diff --git a/config/detekt/detekt.yml b/config/detekt/detekt.yml index ada0a65cf..9862da13b 100644 --- a/config/detekt/detekt.yml +++ b/config/detekt/detekt.yml @@ -105,7 +105,7 @@ complexity: includePrivateDeclarations: false ignoreOverloaded: false CyclomaticComplexMethod: - active: true + active: false threshold: 15 ignoreSingleWhenExpression: false ignoreSimpleWhenEntries: false @@ -144,7 +144,7 @@ complexity: threshold: 3 ignoreArgumentsMatchingNames: false NestedBlockDepth: - active: true + active: false threshold: 4 NestedScopeFunctions: active: false @@ -345,7 +345,7 @@ naming: active: false parameterPattern: '[a-z][A-Za-z0-9]*|_' MatchingDeclarationName: - active: true + active: false mustBeFirst: true MemberNameEqualsClassName: active: false diff --git a/config/images/1.png b/config/images/1.png new file mode 100644 index 000000000..24fd1ab14 Binary files /dev/null and b/config/images/1.png differ diff --git a/config/images/2.png b/config/images/2.png new file mode 100644 index 000000000..e90936bb6 Binary files /dev/null and b/config/images/2.png differ diff --git a/config/images/3.png b/config/images/3.png new file mode 100644 index 000000000..af5f20e66 Binary files /dev/null and b/config/images/3.png differ diff --git a/config/images/4.png b/config/images/4.png new file mode 100644 index 000000000..79e1dbe87 Binary files /dev/null and b/config/images/4.png differ diff --git a/config/images/5.png b/config/images/5.png new file mode 100644 index 000000000..0053343fb Binary files /dev/null and b/config/images/5.png differ diff --git a/config/images/6.png b/config/images/6.png new file mode 100644 index 000000000..194191ad5 Binary files /dev/null and b/config/images/6.png differ diff --git a/config/images/7.png b/config/images/7.png new file mode 100644 index 000000000..400683237 Binary files /dev/null and b/config/images/7.png differ diff --git a/config/images/8.png b/config/images/8.png new file mode 100644 index 000000000..cd4cc84c4 Binary files /dev/null and b/config/images/8.png differ diff --git a/config/screenshots/apache.png b/config/images/apache.png similarity index 100% rename from config/screenshots/apache.png rename to config/images/apache.png diff --git a/config/screenshots/direct-apk.png b/config/images/direct-apk.png similarity index 100% rename from config/screenshots/direct-apk.png rename to config/images/direct-apk.png diff --git a/config/icons/1024.png b/config/images/play_store_app_icon_1024x1024.png similarity index 100% rename from config/icons/1024.png rename to config/images/play_store_app_icon_1024x1024.png diff --git a/config/icons/play_store_512.png b/config/images/play_store_app_icon_512x512.png similarity index 100% rename from config/icons/play_store_512.png rename to config/images/play_store_app_icon_512x512.png diff --git a/config/images/play_store_feature_graphic_1024x500.png b/config/images/play_store_feature_graphic_1024x500.png new file mode 100644 index 000000000..a9791cf28 Binary files /dev/null and b/config/images/play_store_feature_graphic_1024x500.png differ diff --git a/config/screenshots/screen1.png b/config/screenshots/screen1.png deleted file mode 100644 index 595c30dd1..000000000 Binary files a/config/screenshots/screen1.png and /dev/null differ diff --git a/config/screenshots/screen2.png b/config/screenshots/screen2.png deleted file mode 100644 index cb5fa0c71..000000000 Binary files a/config/screenshots/screen2.png and /dev/null differ diff --git a/config/screenshots/screen3.png b/config/screenshots/screen3.png deleted file mode 100644 index ad21f86ad..000000000 Binary files a/config/screenshots/screen3.png and /dev/null differ diff --git a/config/screenshots/screen4.png b/config/screenshots/screen4.png deleted file mode 100644 index 32128b4fe..000000000 Binary files a/config/screenshots/screen4.png and /dev/null differ diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index ff00eb2fc..eec81feb8 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -15,6 +15,7 @@ spotless = "6.22.0" google-services = "4.4.0" gms-play-services-ads = "22.5.0" gms-play-services-base = "18.2.0" +gms-play-services-instantapps = "18.0.1" firebase-analytics-ktx = "21.5.0" firebase-appdistribution = "4.0.1" firebase-config-ktx = "21.5.0" @@ -32,7 +33,7 @@ androidx-compose-ui = "1.5.4" androidx-compose-compiler = "1.5.3" androidx-compose-material = "1.5.4" androidx-compose-material3 = "1.1.2" -androidx-appcompat = "1.7.0-alpha03" +androidx-appcompat = "1.6.1" androidx-activity = "1.8.0" androidx-autofill = "1.1.0" androidx-browser = "1.6.0" @@ -72,6 +73,7 @@ kotlin-coroutines-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-te kotlin-serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "kotlin-serialization-json" } gms-play-services-ads = { module = "com.google.android.gms:play-services-ads", version.ref = "gms-play-services-ads" } gms-play-services-base = { module = "com.google.android.gms:play-services-base", version.ref = "gms-play-services-base" } +gms-play-services-instantapps = { module = "com.google.android.gms:play-services-instantapps", version.ref = "gms-play-services-instantapps" } firebase-analytics-ktx = { module = "com.google.firebase:firebase-analytics-ktx", version.ref = "firebase-analytics-ktx" } firebase-config-ktx = { module = "com.google.firebase:firebase-config-ktx", version.ref = "firebase-config-ktx" } firebase-crashlytics-ktx = { module = "com.google.firebase:firebase-crashlytics-ktx", version.ref = "firebase-crashlytics-ktx" } @@ -207,5 +209,6 @@ hilt = { id = "com.google.dagger.hilt.android", version.ref = "hilt" } androidx-navigation-safeargs = { id = "androidx.navigation.safeargs.kotlin", version.ref = "androidx-navigation" } application = { id = "com.android.application", version.ref = "gradle" } library = { id = "com.android.library", version.ref = "gradle" } +dynamic-feature = { id = "com.android.dynamic-feature", version.ref = "gradle" } test = { id = "com.android.test", version.ref = "gradle" } palantir-git = { id = "com.palantir.git-version", version.ref = "palantir-git" } \ No newline at end of file diff --git a/instant/.gitignore b/instant/.gitignore new file mode 100644 index 000000000..42afabfd2 --- /dev/null +++ b/instant/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/instant/build.gradle.kts b/instant/build.gradle.kts new file mode 100644 index 000000000..39d9565f3 --- /dev/null +++ b/instant/build.gradle.kts @@ -0,0 +1,35 @@ +plugins { + alias(libs.plugins.dynamic.feature) + alias(libs.plugins.kotlin) +} + +android { + namespace = "org.michaelbel.movies.instant" + compileSdk = libs.versions.compile.sdk.get().toInt() + + defaultConfig { + minSdk = libs.versions.min.sdk.get().toInt() + } + + buildFeatures { + compose = true + } + + composeOptions { + kotlinCompilerExtensionVersion = libs.versions.androidx.compose.compiler.get() + } + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 + } +} + +dependencies { + implementation(project(":app")) + implementation(project(":core:ui")) + implementation(libs.androidx.activity.compose) + implementation(libs.androidx.appcompat) + implementation(libs.androidx.compose.material3) + implementation(libs.gms.play.services.instantapps) +} \ No newline at end of file diff --git a/instant/src/main/AndroidManifest.xml b/instant/src/main/AndroidManifest.xml new file mode 100644 index 000000000..0ae7b05a9 --- /dev/null +++ b/instant/src/main/AndroidManifest.xml @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/instant/src/main/java/org/michaelbel/movies/dynamic/InstantMainActivity.kt b/instant/src/main/java/org/michaelbel/movies/dynamic/InstantMainActivity.kt new file mode 100644 index 000000000..9bdf5f91d --- /dev/null +++ b/instant/src/main/java/org/michaelbel/movies/dynamic/InstantMainActivity.kt @@ -0,0 +1,34 @@ +package org.michaelbel.movies.dynamic + +import android.os.Bundle +import androidx.activity.ComponentActivity +import androidx.activity.compose.setContent +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Text +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.core.view.WindowCompat +import org.michaelbel.movies.ui.theme.MoviesTheme + +internal class InstantMainActivity: ComponentActivity() { + + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + WindowCompat.setDecorFitsSystemWindows(window, false) + setContent { + MoviesTheme { + Box( + modifier = Modifier.fillMaxSize(), + contentAlignment = Alignment.Center + ) { + Text( + text = "Hello Movies Instant App!", + color = MaterialTheme.colorScheme.onBackground + ) + } + } + } + } +} \ No newline at end of file diff --git a/readme.md b/readme.md index 9f1913bac..1d829be29 100644 --- a/readme.md +++ b/readme.md @@ -9,10 +9,14 @@ Movies Movies - easy way to discover popular movies. This is a simple TMDb client for Android
- - - - + + + + + + + +
## Build @@ -25,7 +29,7 @@ TMDB_API_KEY=your_own_tmdb_api_key ## Download [](https://play.google.com/store/apps/details?id=org.michaelbel.moviemade) -[](https://github.com/michaelbel/movies/releases/download/1.4.6/Movies-v1.4.6.1196.-release.apk) +[](https://github.com/michaelbel/movies/releases/download/1.4.6/Movies-v1.4.6.1196.-release.apk) ## Technologies @@ -116,7 +120,7 @@ If you find any problems or would like to suggest a feature, please feel free to ## License - Apache License 2.0 + Apache License 2.0 Copyright 2017 Michael Bely diff --git a/settings.gradle.kts b/settings.gradle.kts index 20019b190..c6dd8945f 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -18,7 +18,7 @@ rootProject.name = "movies" include( ":app", - + ":instant", ":benchmark", ":core:analytics",