diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 420a509f..fc9bca41 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -80,17 +80,6 @@ - - - - - - - - \ No newline at end of file diff --git a/appcompose/.gitignore b/appcompose/.gitignore new file mode 100644 index 00000000..42afabfd --- /dev/null +++ b/appcompose/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/appcompose/build.gradle b/appcompose/build.gradle new file mode 100644 index 00000000..018dbc78 --- /dev/null +++ b/appcompose/build.gradle @@ -0,0 +1,80 @@ +plugins { + id 'com.android.application' + id 'org.jetbrains.kotlin.android' +} + +android { + namespace 'com.readrops.app.compose' + compileSdk 33 + + defaultConfig { + applicationId "com.readrops.app.compose" + minSdk 21 + targetSdk 33 + versionCode 1 + versionName "1.0" + + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" + } + + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' + } + + debug { + minifyEnabled false + shrinkResources false + + testCoverageEnabled true + applicationIdSuffix ".debug" + proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' + } + } + + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + + kotlinOptions { + jvmTarget = '1.8' + } + + buildFeatures { + buildConfig true + compose true + } + + composeOptions { + kotlinCompilerExtensionVersion = "1.4.0" + } +} + +dependencies { + implementation 'androidx.core:core-ktx:1.7.0' + implementation 'androidx.appcompat:appcompat:1.6.1' + implementation 'com.google.android.material:material:1.8.0' + + testImplementation 'junit:junit:4.13.2' + androidTestImplementation 'androidx.test.ext:junit:1.1.5' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1' + + def composeBom = platform('androidx.compose:compose-bom:2022.12.00') + implementation composeBom + androidTestImplementation composeBom + + implementation 'androidx.activity:activity-compose:1.5.1' + implementation 'androidx.compose.material3:material3' + + def voyager = "1.0.0-rc03" + implementation "cafe.adriel.voyager:voyager-navigator:$voyager" + implementation "cafe.adriel.voyager:voyager-bottom-sheet-navigator:$voyager" + implementation "cafe.adriel.voyager:voyager-tab-navigator:$voyager" + implementation "cafe.adriel.voyager:voyager-androidx:$voyager" + //implementation "cafe.adriel.voyager:voyager-koin:$voyager" + + debugImplementation "androidx.compose.ui:ui-tooling:1.3.3" + implementation "androidx.compose.ui:ui-tooling-preview:1.3.3" +} \ No newline at end of file diff --git a/appcompose/proguard-rules.pro b/appcompose/proguard-rules.pro new file mode 100644 index 00000000..481bb434 --- /dev/null +++ b/appcompose/proguard-rules.pro @@ -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 \ No newline at end of file diff --git a/appcompose/src/androidTest/java/com/readrops/app/compose/ExampleInstrumentedTest.kt b/appcompose/src/androidTest/java/com/readrops/app/compose/ExampleInstrumentedTest.kt new file mode 100644 index 00000000..831e9c8c --- /dev/null +++ b/appcompose/src/androidTest/java/com/readrops/app/compose/ExampleInstrumentedTest.kt @@ -0,0 +1,24 @@ +package com.readrops.app.compose + +import androidx.test.platform.app.InstrumentationRegistry +import androidx.test.ext.junit.runners.AndroidJUnit4 + +import org.junit.Test +import org.junit.runner.RunWith + +import org.junit.Assert.* + +/** + * Instrumented test, which will execute on an Android device. + * + * See [testing documentation](http://d.android.com/tools/testing). + */ +@RunWith(AndroidJUnit4::class) +class ExampleInstrumentedTest { + @Test + fun useAppContext() { + // Context of the app under test. + val appContext = InstrumentationRegistry.getInstrumentation().targetContext + assertEquals("com.readrops.app.compose", appContext.packageName) + } +} \ No newline at end of file diff --git a/appcompose/src/main/AndroidManifest.xml b/appcompose/src/main/AndroidManifest.xml new file mode 100644 index 00000000..1cbd94ad --- /dev/null +++ b/appcompose/src/main/AndroidManifest.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/java/com/readrops/app/BaseActivity.kt b/appcompose/src/main/java/com/readrops/app/compose/BaseActivity.kt similarity index 98% rename from app/src/main/java/com/readrops/app/BaseActivity.kt rename to appcompose/src/main/java/com/readrops/app/compose/BaseActivity.kt index d5bc080e..5b687973 100644 --- a/app/src/main/java/com/readrops/app/BaseActivity.kt +++ b/appcompose/src/main/java/com/readrops/app/compose/BaseActivity.kt @@ -1,4 +1,4 @@ -package com.readrops.app +package com.readrops.app.compose import android.os.Bundle import androidx.activity.ComponentActivity @@ -13,7 +13,6 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.res.painterResource import cafe.adriel.voyager.navigator.CurrentScreen import cafe.adriel.voyager.navigator.Navigator -import com.readrops.app.compose.ReadropsTheme import com.readrops.app.compose.account.AccountScreen import com.readrops.app.compose.feeds.FeedsScreen import com.readrops.app.compose.more.MoreScreen diff --git a/app/src/main/java/com/readrops/app/compose/Color.kt b/appcompose/src/main/java/com/readrops/app/compose/Color.kt similarity index 100% rename from app/src/main/java/com/readrops/app/compose/Color.kt rename to appcompose/src/main/java/com/readrops/app/compose/Color.kt diff --git a/app/src/main/java/com/readrops/app/compose/Theme.kt b/appcompose/src/main/java/com/readrops/app/compose/Theme.kt similarity index 100% rename from app/src/main/java/com/readrops/app/compose/Theme.kt rename to appcompose/src/main/java/com/readrops/app/compose/Theme.kt diff --git a/app/src/main/java/com/readrops/app/compose/account/AccountScreen.kt b/appcompose/src/main/java/com/readrops/app/compose/account/AccountScreen.kt similarity index 100% rename from app/src/main/java/com/readrops/app/compose/account/AccountScreen.kt rename to appcompose/src/main/java/com/readrops/app/compose/account/AccountScreen.kt diff --git a/app/src/main/java/com/readrops/app/compose/feeds/FeedsScreen.kt b/appcompose/src/main/java/com/readrops/app/compose/feeds/FeedsScreen.kt similarity index 100% rename from app/src/main/java/com/readrops/app/compose/feeds/FeedsScreen.kt rename to appcompose/src/main/java/com/readrops/app/compose/feeds/FeedsScreen.kt diff --git a/app/src/main/java/com/readrops/app/compose/more/MoreScreen.kt b/appcompose/src/main/java/com/readrops/app/compose/more/MoreScreen.kt similarity index 100% rename from app/src/main/java/com/readrops/app/compose/more/MoreScreen.kt rename to appcompose/src/main/java/com/readrops/app/compose/more/MoreScreen.kt diff --git a/app/src/main/java/com/readrops/app/compose/timelime/TimelineItem.kt b/appcompose/src/main/java/com/readrops/app/compose/timelime/TimelineItem.kt similarity index 93% rename from app/src/main/java/com/readrops/app/compose/timelime/TimelineItem.kt rename to appcompose/src/main/java/com/readrops/app/compose/timelime/TimelineItem.kt index 9a88202e..55fe0f2e 100644 --- a/app/src/main/java/com/readrops/app/compose/timelime/TimelineItem.kt +++ b/appcompose/src/main/java/com/readrops/app/compose/timelime/TimelineItem.kt @@ -3,13 +3,11 @@ package com.readrops.app.compose.timelime import androidx.compose.foundation.background import androidx.compose.foundation.layout.* import androidx.compose.material3.Card -import androidx.compose.material3.Icon import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color -import androidx.compose.ui.res.painterResource import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp @@ -33,11 +31,11 @@ fun TimelineItem() { Row( verticalAlignment = Alignment.CenterVertically, ) { - Icon( + /* Icon( painter = painterResource(id = com.readrops.app.R.drawable.ic_rss_feed_grey), contentDescription = null, // modifier = Modifier.size((MaterialTheme.typography.subtitle2.fontSize.value * 1.5).dp) - ) + )*/ // Spacer(Modifier.padding(4.dp)) diff --git a/app/src/main/java/com/readrops/app/compose/timelime/TimelineScreen.kt b/appcompose/src/main/java/com/readrops/app/compose/timelime/TimelineScreen.kt similarity index 99% rename from app/src/main/java/com/readrops/app/compose/timelime/TimelineScreen.kt rename to appcompose/src/main/java/com/readrops/app/compose/timelime/TimelineScreen.kt index e17b14f3..f7d9e9c1 100644 --- a/app/src/main/java/com/readrops/app/compose/timelime/TimelineScreen.kt +++ b/appcompose/src/main/java/com/readrops/app/compose/timelime/TimelineScreen.kt @@ -13,6 +13,4 @@ class TimelineScreen : AndroidScreen() { TimelineItem() } } - - } \ No newline at end of file diff --git a/appcompose/src/main/res/drawable-v24/ic_launcher_foreground.xml b/appcompose/src/main/res/drawable-v24/ic_launcher_foreground.xml new file mode 100644 index 00000000..2b068d11 --- /dev/null +++ b/appcompose/src/main/res/drawable-v24/ic_launcher_foreground.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/appcompose/src/main/res/drawable/ic_launcher_background.xml b/appcompose/src/main/res/drawable/ic_launcher_background.xml new file mode 100644 index 00000000..07d5da9c --- /dev/null +++ b/appcompose/src/main/res/drawable/ic_launcher_background.xml @@ -0,0 +1,170 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/appcompose/src/main/res/drawable/ic_rss_feed_grey.xml b/appcompose/src/main/res/drawable/ic_rss_feed_grey.xml new file mode 100644 index 00000000..fedffd69 --- /dev/null +++ b/appcompose/src/main/res/drawable/ic_rss_feed_grey.xml @@ -0,0 +1,6 @@ + + + + diff --git a/appcompose/src/main/res/drawable/ic_timeline.xml b/appcompose/src/main/res/drawable/ic_timeline.xml new file mode 100644 index 00000000..68d26c91 --- /dev/null +++ b/appcompose/src/main/res/drawable/ic_timeline.xml @@ -0,0 +1,5 @@ + + + diff --git a/appcompose/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/appcompose/src/main/res/mipmap-anydpi-v26/ic_launcher.xml new file mode 100644 index 00000000..eca70cfe --- /dev/null +++ b/appcompose/src/main/res/mipmap-anydpi-v26/ic_launcher.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/appcompose/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/appcompose/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml new file mode 100644 index 00000000..eca70cfe --- /dev/null +++ b/appcompose/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/appcompose/src/main/res/mipmap-anydpi-v33/ic_launcher.xml b/appcompose/src/main/res/mipmap-anydpi-v33/ic_launcher.xml new file mode 100644 index 00000000..6f3b755b --- /dev/null +++ b/appcompose/src/main/res/mipmap-anydpi-v33/ic_launcher.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/appcompose/src/main/res/mipmap-hdpi/ic_launcher.webp b/appcompose/src/main/res/mipmap-hdpi/ic_launcher.webp new file mode 100644 index 00000000..c209e78e Binary files /dev/null and b/appcompose/src/main/res/mipmap-hdpi/ic_launcher.webp differ diff --git a/appcompose/src/main/res/mipmap-hdpi/ic_launcher_round.webp b/appcompose/src/main/res/mipmap-hdpi/ic_launcher_round.webp new file mode 100644 index 00000000..b2dfe3d1 Binary files /dev/null and b/appcompose/src/main/res/mipmap-hdpi/ic_launcher_round.webp differ diff --git a/appcompose/src/main/res/mipmap-mdpi/ic_launcher.webp b/appcompose/src/main/res/mipmap-mdpi/ic_launcher.webp new file mode 100644 index 00000000..4f0f1d64 Binary files /dev/null and b/appcompose/src/main/res/mipmap-mdpi/ic_launcher.webp differ diff --git a/appcompose/src/main/res/mipmap-mdpi/ic_launcher_round.webp b/appcompose/src/main/res/mipmap-mdpi/ic_launcher_round.webp new file mode 100644 index 00000000..62b611da Binary files /dev/null and b/appcompose/src/main/res/mipmap-mdpi/ic_launcher_round.webp differ diff --git a/appcompose/src/main/res/mipmap-xhdpi/ic_launcher.webp b/appcompose/src/main/res/mipmap-xhdpi/ic_launcher.webp new file mode 100644 index 00000000..948a3070 Binary files /dev/null and b/appcompose/src/main/res/mipmap-xhdpi/ic_launcher.webp differ diff --git a/appcompose/src/main/res/mipmap-xhdpi/ic_launcher_round.webp b/appcompose/src/main/res/mipmap-xhdpi/ic_launcher_round.webp new file mode 100644 index 00000000..1b9a6956 Binary files /dev/null and b/appcompose/src/main/res/mipmap-xhdpi/ic_launcher_round.webp differ diff --git a/appcompose/src/main/res/mipmap-xxhdpi/ic_launcher.webp b/appcompose/src/main/res/mipmap-xxhdpi/ic_launcher.webp new file mode 100644 index 00000000..28d4b77f Binary files /dev/null and b/appcompose/src/main/res/mipmap-xxhdpi/ic_launcher.webp differ diff --git a/appcompose/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp b/appcompose/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp new file mode 100644 index 00000000..9287f508 Binary files /dev/null and b/appcompose/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp differ diff --git a/appcompose/src/main/res/mipmap-xxxhdpi/ic_launcher.webp b/appcompose/src/main/res/mipmap-xxxhdpi/ic_launcher.webp new file mode 100644 index 00000000..aa7d6427 Binary files /dev/null and b/appcompose/src/main/res/mipmap-xxxhdpi/ic_launcher.webp differ diff --git a/appcompose/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp b/appcompose/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp new file mode 100644 index 00000000..9126ae37 Binary files /dev/null and b/appcompose/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp differ diff --git a/appcompose/src/main/res/values-night/themes.xml b/appcompose/src/main/res/values-night/themes.xml new file mode 100644 index 00000000..9244c6b6 --- /dev/null +++ b/appcompose/src/main/res/values-night/themes.xml @@ -0,0 +1,16 @@ + + + + \ No newline at end of file diff --git a/appcompose/src/main/res/values/colors.xml b/appcompose/src/main/res/values/colors.xml new file mode 100644 index 00000000..f8c6127d --- /dev/null +++ b/appcompose/src/main/res/values/colors.xml @@ -0,0 +1,10 @@ + + + #FFBB86FC + #FF6200EE + #FF3700B3 + #FF03DAC5 + #FF018786 + #FF000000 + #FFFFFFFF + \ No newline at end of file diff --git a/appcompose/src/main/res/values/strings.xml b/appcompose/src/main/res/values/strings.xml new file mode 100644 index 00000000..731b4987 --- /dev/null +++ b/appcompose/src/main/res/values/strings.xml @@ -0,0 +1,3 @@ + + app compose + \ No newline at end of file diff --git a/appcompose/src/main/res/values/themes.xml b/appcompose/src/main/res/values/themes.xml new file mode 100644 index 00000000..de5183ef --- /dev/null +++ b/appcompose/src/main/res/values/themes.xml @@ -0,0 +1,16 @@ + + + + \ No newline at end of file diff --git a/appcompose/src/test/java/com/readrops/app/compose/ExampleUnitTest.kt b/appcompose/src/test/java/com/readrops/app/compose/ExampleUnitTest.kt new file mode 100644 index 00000000..64e9d35d --- /dev/null +++ b/appcompose/src/test/java/com/readrops/app/compose/ExampleUnitTest.kt @@ -0,0 +1,17 @@ +package com.readrops.app.compose + +import org.junit.Test + +import org.junit.Assert.* + +/** + * Example local unit test, which will execute on the development machine (host). + * + * See [testing documentation](http://d.android.com/tools/testing). + */ +class ExampleUnitTest { + @Test + fun addition_isCorrect() { + assertEquals(4, 2 + 2) + } +} \ No newline at end of file diff --git a/settings.gradle b/settings.gradle index 3836269d..1ac70bad 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1 +1,2 @@ include ':app', ':api', ':db' +include ':appcompose'