Skip to content

Commit

Permalink
Multiplatform
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelbel committed Mar 18, 2024
1 parent 3e094f8 commit 2ff30ba
Show file tree
Hide file tree
Showing 31 changed files with 65 additions and 72 deletions.
8 changes: 2 additions & 6 deletions benchmark/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@file:Suppress("UnstableApiUsage")

plugins {
alias(libs.plugins.android.test)
alias(libs.plugins.kotlin.android)
Expand All @@ -21,12 +23,6 @@ android {
}
}

kotlinOptions {
freeCompilerArgs = freeCompilerArgs + listOf(
"-opt-in=androidx.benchmark.macro.ExperimentalBaselineProfilesApi"
)
}

compileOptions {
sourceCompatibility = JavaVersion.toVersion(libs.versions.jdk.get().toInt())
targetCompatibility = JavaVersion.toVersion(libs.versions.jdk.get().toInt())
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
@file:SuppressLint("NewApi")

package org.michaelbel.movies.benchmark

import android.annotation.SuppressLint
import androidx.benchmark.macro.BaselineProfileMode
import androidx.benchmark.macro.CompilationMode
import androidx.benchmark.macro.StartupMode
Expand Down
7 changes: 1 addition & 6 deletions core/interactor/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@Suppress("dsl_scope_violation")

plugins {
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
Expand All @@ -21,12 +22,6 @@ android {
}
}*/

kotlinOptions {
freeCompilerArgs = freeCompilerArgs + listOf(
"-opt-in=androidx.paging.ExperimentalPagingApi"
)
}

compileOptions {
sourceCompatibility = JavaVersion.toVersion(libs.versions.jdk.get().toInt())
targetCompatibility = JavaVersion.toVersion(libs.versions.jdk.get().toInt())
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
@file:OptIn(ExperimentalPagingApi::class)

package org.michaelbel.movies.interactor.impl

import androidx.paging.ExperimentalPagingApi
import androidx.paging.Pager
import androidx.paging.PagingConfig
import androidx.paging.PagingData
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
@file:OptIn(ExperimentalPagingApi::class)

package org.michaelbel.movies.interactor.remote

import androidx.paging.ExperimentalPagingApi
import androidx.paging.LoadType
import androidx.paging.PagingState
import androidx.paging.RemoteMediator
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
@file:OptIn(ExperimentalPagingApi::class)

package org.michaelbel.movies.interactor.remote

import androidx.paging.ExperimentalPagingApi
import androidx.paging.LoadType
import androidx.paging.PagingState
import androidx.paging.RemoteMediator
Expand Down
6 changes: 0 additions & 6 deletions core/widget/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,6 @@ android {
targetCompatibility = JavaVersion.toVersion(libs.versions.jdk.get().toInt())
}

kotlinOptions {
freeCompilerArgs = freeCompilerArgs + listOf(
"-opt-in=androidx.compose.material3.ExperimentalMaterial3Api"
)
}

lint {
quiet = true
abortOnError = false
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@file:OptIn(ExperimentalMaterial3Api::class)

package org.michaelbel.movies.widget.configure

import androidx.activity.SystemBarStyle
Expand All @@ -6,6 +8,7 @@ import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.windowInsetsPadding
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Scaffold
import androidx.compose.material3.Text
Expand Down
6 changes: 0 additions & 6 deletions core/work/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,6 @@ android {
}
}*/

kotlinOptions {
freeCompilerArgs = freeCompilerArgs + listOf(
"-opt-in=kotlinx.serialization.ExperimentalSerializationApi"
)
}

compileOptions {
sourceCompatibility = JavaVersion.toVersion(libs.versions.jdk.get().toInt())
targetCompatibility = JavaVersion.toVersion(libs.versions.jdk.get().toInt())
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@file:OptIn(ExperimentalSerializationApi::class)

package org.michaelbel.movies.work

import android.content.Context
Expand All @@ -7,6 +9,7 @@ import androidx.work.WorkerParameters
import dagger.assisted.Assisted
import dagger.assisted.AssistedInject
import kotlinx.coroutines.withContext
import kotlinx.serialization.ExperimentalSerializationApi
import kotlinx.serialization.json.Json
import kotlinx.serialization.json.decodeFromStream
import org.michaelbel.movies.common.dispatchers.MoviesDispatchers
Expand Down
6 changes: 0 additions & 6 deletions feature/account-impl/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,6 @@ android {
}
}*/

kotlinOptions {
freeCompilerArgs = freeCompilerArgs + listOf(
"-opt-in=androidx.compose.material3.ExperimentalMaterial3Api"
)
}

buildFeatures {
compose = true
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
@file:OptIn(ExperimentalMaterial3Api::class)

package org.michaelbel.movies.account.ui

import androidx.compose.foundation.background
import androidx.compose.material3.CenterAlignedTopAppBar
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text
import androidx.compose.material3.TopAppBarDefaults
Expand Down
6 changes: 0 additions & 6 deletions feature/auth-impl/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,6 @@ android {
}
}*/

kotlinOptions {
freeCompilerArgs = freeCompilerArgs + listOf(
"-opt-in=androidx.compose.material3.ExperimentalMaterial3Api"
)
}

buildFeatures {
compose = true
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
@file:OptIn(ExperimentalMaterial3Api::class)

package org.michaelbel.movies.auth.ui

import androidx.compose.foundation.background
import androidx.compose.material3.CenterAlignedTopAppBar
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text
import androidx.compose.material3.TopAppBarDefaults
Expand Down
8 changes: 1 addition & 7 deletions feature/details-impl/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@Suppress("dsl_scope_violation")

plugins {
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
Expand All @@ -22,13 +23,6 @@ android {
}
}*/

kotlinOptions {
freeCompilerArgs = freeCompilerArgs + listOf(
"-opt-in=androidx.compose.material3.ExperimentalMaterial3Api",
"-opt-in=androidx.compose.foundation.ExperimentalFoundationApi"
)
}

buildFeatures {
compose = true
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
@file:OptIn(
ExperimentalMaterial3Api::class,
ExperimentalFoundationApi::class
)

package org.michaelbel.movies.details.ui

import androidx.compose.animation.animateColorAsState
import androidx.compose.animation.core.LinearEasing
import androidx.compose.animation.core.tween
import androidx.compose.foundation.ExperimentalFoundationApi
import androidx.compose.foundation.gestures.snapping.rememberSnapFlingBehavior
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
Expand All @@ -12,6 +18,7 @@ import androidx.compose.foundation.layout.width
import androidx.compose.foundation.layout.windowInsetsPadding
import androidx.compose.foundation.lazy.LazyRow
import androidx.compose.foundation.lazy.rememberLazyListState
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.Scaffold
import androidx.compose.material3.TopAppBarDefaults
import androidx.compose.runtime.Composable
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
@file:OptIn(ExperimentalMaterial3Api::class)

package org.michaelbel.movies.details.ui

import androidx.compose.animation.AnimatedVisibility
import androidx.compose.animation.fadeIn
import androidx.compose.foundation.layout.statusBarsPadding
import androidx.compose.foundation.layout.windowInsetsPadding
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text
import androidx.compose.material3.TopAppBar
Expand Down
8 changes: 1 addition & 7 deletions feature/feed-impl/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@Suppress("dsl_scope_violation")

plugins {
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
Expand All @@ -22,13 +23,6 @@ android {
}
}*/

kotlinOptions {
freeCompilerArgs = freeCompilerArgs + listOf(
"-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi",
"-opt-in=androidx.compose.material3.ExperimentalMaterial3Api"
)
}

buildFeatures {
compose = true
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@file:OptIn(ExperimentalCoroutinesApi::class)

package org.michaelbel.movies.feed

import androidx.compose.runtime.getValue
Expand All @@ -7,6 +9,7 @@ import androidx.lifecycle.SavedStateHandle
import androidx.paging.PagingData
import androidx.paging.cachedIn
import dagger.hilt.android.lifecycle.HiltViewModel
import kotlinx.coroutines.ExperimentalCoroutinesApi
import javax.inject.Inject
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.MutableStateFlow
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@file:OptIn(ExperimentalMaterial3Api::class)

package org.michaelbel.movies.feed.ui

import androidx.activity.compose.BackHandler
Expand All @@ -9,6 +11,7 @@ import androidx.compose.foundation.lazy.grid.rememberLazyGridState
import androidx.compose.foundation.lazy.rememberLazyListState
import androidx.compose.foundation.lazy.staggeredgrid.rememberLazyStaggeredGridState
import androidx.compose.material3.BottomSheetScaffold
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Scaffold
import androidx.compose.material3.SheetValue
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
@file:OptIn(ExperimentalMaterial3Api::class)

package org.michaelbel.movies.feed.ui

import androidx.compose.foundation.Image
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.layout.statusBarsPadding
import androidx.compose.foundation.layout.windowInsetsPadding
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.IconButton
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text
Expand Down
7 changes: 1 addition & 6 deletions feature/gallery-impl/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@Suppress("dsl_scope_violation")

plugins {
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
Expand All @@ -22,12 +23,6 @@ android {
}
}*/

kotlinOptions {
freeCompilerArgs = freeCompilerArgs + listOf(
"-opt-in=androidx.compose.foundation.ExperimentalFoundationApi"
)
}

buildFeatures {
compose = true
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@file:OptIn(ExperimentalFoundationApi::class)

package org.michaelbel.movies.gallery.ui

import android.content.Intent
Expand All @@ -7,6 +9,7 @@ import androidx.activity.compose.rememberLauncherForActivityResult
import androidx.activity.result.contract.ActivityResultContracts
import androidx.compose.animation.AnimatedVisibility
import androidx.compose.animation.fadeIn
import androidx.compose.foundation.ExperimentalFoundationApi
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.statusBarsPadding
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

package org.michaelbel.movies.gallery.zoomable

import android.annotation.SuppressLint
import androidx.compose.animation.core.AnimationSpec
import androidx.compose.animation.core.spring
import androidx.compose.foundation.gestures.awaitEachGesture
Expand Down
7 changes: 0 additions & 7 deletions feature/search-impl/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,6 @@ android {
}
}*/

kotlinOptions {
freeCompilerArgs = freeCompilerArgs + listOf(
"-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi",
"-opt-in=androidx.compose.material3.ExperimentalMaterial3Api"
)
}

buildFeatures {
compose = true
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
@file:OptIn(ExperimentalCoroutinesApi::class)

package org.michaelbel.movies.search

import androidx.paging.PagingData
import androidx.paging.cachedIn
import dagger.hilt.android.lifecycle.HiltViewModel
import kotlinx.coroutines.ExperimentalCoroutinesApi
import javax.inject.Inject
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.MutableStateFlow
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@file:OptIn(ExperimentalMaterial3Api::class)

package org.michaelbel.movies.search.ui

import androidx.compose.foundation.clickable
Expand All @@ -9,6 +11,7 @@ import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.imePadding
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.lazy.items
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.SearchBar
import androidx.compose.material3.SearchBarDefaults
Expand Down
6 changes: 0 additions & 6 deletions feature/settings-impl/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,6 @@ android {
}
}*/

kotlinOptions {
freeCompilerArgs = freeCompilerArgs + listOf(
"-opt-in=androidx.compose.material3.ExperimentalMaterial3Api"
)
}

buildFeatures {
buildConfig = true
compose = true
Expand Down
Loading

0 comments on commit 2ff30ba

Please sign in to comment.