From 91bff7fad486cff21a1037ed11ba8b72f32870ae Mon Sep 17 00:00:00 2001 From: ganfra Date: Thu, 23 Mar 2023 18:06:32 +0100 Subject: [PATCH 1/7] Add utility methods for automatically including api/impl feature modules --- app/build.gradle.kts | 2 +- appnav/build.gradle.kts | 2 +- .../kotlin/extension/DependencyHandleScope.kt | 43 ++++++++++--------- settings.gradle.kts | 37 ++++++++-------- tests/uitests/build.gradle.kts | 2 +- 5 files changed, 43 insertions(+), 43 deletions(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index effa886c4d..50db9aa617 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -203,7 +203,7 @@ knit { dependencies { allLibrariesImpl() allServicesImpl() - allFeaturesImpl() + allFeaturesImpl(rootDir) implementation(projects.tests.uitests) implementation(projects.anvilannotations) implementation(projects.appnav) diff --git a/appnav/build.gradle.kts b/appnav/build.gradle.kts index 082d876fbd..1c1c1635b4 100644 --- a/appnav/build.gradle.kts +++ b/appnav/build.gradle.kts @@ -38,7 +38,7 @@ dependencies { implementation(libs.dagger) kapt(libs.dagger.compiler) - allFeaturesApi() + allFeaturesApi(rootDir) implementation(projects.libraries.core) implementation(projects.libraries.architecture) diff --git a/plugins/src/main/kotlin/extension/DependencyHandleScope.kt b/plugins/src/main/kotlin/extension/DependencyHandleScope.kt index 52063dd08e..4287d74101 100644 --- a/plugins/src/main/kotlin/extension/DependencyHandleScope.kt +++ b/plugins/src/main/kotlin/extension/DependencyHandleScope.kt @@ -22,6 +22,7 @@ import gradle.kotlin.dsl.accessors._71f190358cebd46a469f2989484fd643.implementat import org.gradle.accessors.dm.LibrariesForLibs import org.gradle.kotlin.dsl.DependencyHandlerScope import org.gradle.kotlin.dsl.project +import java.io.File /** * Dependencies used by all the modules @@ -51,6 +52,21 @@ fun DependencyHandlerScope.composeDependencies(libs: LibrariesForLibs) { implementation("org.jetbrains.kotlinx:kotlinx-collections-immutable:0.3.5") } +private fun DependencyHandlerScope.addImplementationProjects(directory: File, path: String, nameFilter: String) { + directory.listFiles().orEmpty().forEach { file -> + if (file.isDirectory) { + val newPath = "$path:${file.name}" + val buildFile = File(file, "build.gradle.kts") + if (buildFile.exists() && file.name == nameFilter) { + implementation(project(newPath)) + println("Added implementation(project($newPath))") + } else { + addImplementationProjects(file, newPath, nameFilter) + } + } + } +} + fun DependencyHandlerScope.allLibrariesImpl() { implementation(project(":libraries:designsystem")) implementation(project(":libraries:matrix:impl")) @@ -70,26 +86,11 @@ fun DependencyHandlerScope.allServicesImpl() { implementation(project(":services:toolbox:impl")) } -fun DependencyHandlerScope.allFeaturesApi() { - implementation(project(":features:onboarding:api")) - implementation(project(":features:login:api")) - implementation(project(":features:logout:api")) - implementation(project(":features:roomlist:api")) - implementation(project(":features:messages:api")) - implementation(project(":features:rageshake:api")) - implementation(project(":features:preferences:api")) - implementation(project(":features:createroom:api")) - implementation(project(":features:verifysession:api")) +fun DependencyHandlerScope.allFeaturesApi(rootDir: File) { + val featuresDir = File(rootDir, "features") + addImplementationProjects(featuresDir, ":features", "api") } - -fun DependencyHandlerScope.allFeaturesImpl() { - implementation(project(":features:onboarding:impl")) - implementation(project(":features:login:impl")) - implementation(project(":features:logout:impl")) - implementation(project(":features:roomlist:impl")) - implementation(project(":features:messages:impl")) - implementation(project(":features:rageshake:impl")) - implementation(project(":features:preferences:impl")) - implementation(project(":features:createroom:impl")) - implementation(project(":features:verifysession:impl")) +fun DependencyHandlerScope.allFeaturesImpl(rootDir: File) { + val featuresDir = File(rootDir, "features") + addImplementationProjects(featuresDir, ":features", "impl") } diff --git a/settings.gradle.kts b/settings.gradle.kts index 0fd8bc2938..4cab3cca2a 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -73,22 +73,21 @@ include(":services:appnavstate:impl") include(":services:toolbox:api") include(":services:toolbox:impl") -include(":features:onboarding:api") -include(":features:onboarding:impl") -include(":features:logout:api") -include(":features:logout:impl") -include(":features:roomlist:api") -include(":features:roomlist:impl") -include(":features:rageshake:api") -include(":features:rageshake:impl") -include(":features:rageshake:test") -include(":features:preferences:api") -include(":features:preferences:impl") -include(":features:messages:api") -include(":features:messages:impl") -include(":features:login:api") -include(":features:login:impl") -include(":features:createroom:api") -include(":features:createroom:impl") -include(":features:verifysession:api") -include(":features:verifysession:impl") + +fun includeProjects(directory: File, path: String) { + directory.listFiles().orEmpty().forEach { file -> + if (file.isDirectory) { + val newPath = "$path:${file.name}" + val buildFile = File(file, "build.gradle.kts") + if (buildFile.exists()) { + include(newPath) + println("Included project: $newPath") + } else { + includeProjects(file, newPath) + } + } + } +} + +val featuresDir = File(rootDir, "features") +includeProjects(featuresDir, ":features") diff --git a/tests/uitests/build.gradle.kts b/tests/uitests/build.gradle.kts index b7abf23940..9c667beae0 100644 --- a/tests/uitests/build.gradle.kts +++ b/tests/uitests/build.gradle.kts @@ -40,5 +40,5 @@ dependencies { ksp(libs.showkase.processor) allLibrariesImpl() - allFeaturesImpl() + allFeaturesImpl(rootDir) } From 33c1f0c03e06e472fd4562e04bed61615aebdda6 Mon Sep 17 00:00:00 2001 From: ganfra Date: Thu, 23 Mar 2023 18:09:03 +0100 Subject: [PATCH 2/7] Templates: remove template dir in feature module --- features/template/.gitignore | 1 - features/template/build.gradle.kts | 56 ------------------ features/template/consumer-rules.pro | 0 features/template/proguard-rules.pro | 21 ------- .../template/src/main/AndroidManifest.xml | 20 ------- .../features/template/TemplateEvents.kt | 22 ------- .../android/features/template/TemplateNode.kt | 45 -------------- .../features/template/TemplatePresenter.kt | 38 ------------ .../features/template/TemplateState.kt | 23 -------- .../template/TemplateStateProvider.kt | 31 ---------- .../android/features/template/TemplateView.kt | 58 ------------------- .../template/TemplatePresenterTests.kt | 52 ----------------- 12 files changed, 367 deletions(-) delete mode 100644 features/template/.gitignore delete mode 100644 features/template/build.gradle.kts delete mode 100644 features/template/consumer-rules.pro delete mode 100644 features/template/proguard-rules.pro delete mode 100644 features/template/src/main/AndroidManifest.xml delete mode 100644 features/template/src/main/kotlin/io/element/android/features/template/TemplateEvents.kt delete mode 100644 features/template/src/main/kotlin/io/element/android/features/template/TemplateNode.kt delete mode 100644 features/template/src/main/kotlin/io/element/android/features/template/TemplatePresenter.kt delete mode 100644 features/template/src/main/kotlin/io/element/android/features/template/TemplateState.kt delete mode 100644 features/template/src/main/kotlin/io/element/android/features/template/TemplateStateProvider.kt delete mode 100644 features/template/src/main/kotlin/io/element/android/features/template/TemplateView.kt delete mode 100644 features/template/src/test/kotlin/io/element/android/features/template/TemplatePresenterTests.kt diff --git a/features/template/.gitignore b/features/template/.gitignore deleted file mode 100644 index 42afabfd2a..0000000000 --- a/features/template/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/build \ No newline at end of file diff --git a/features/template/build.gradle.kts b/features/template/build.gradle.kts deleted file mode 100644 index 409a0c9bc5..0000000000 --- a/features/template/build.gradle.kts +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) 2023 New Vector Ltd - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// TODO: Remove once https://youtrack.jetbrains.com/issue/KTIJ-19369 is fixed -@Suppress("DSL_SCOPE_VIOLATION") -plugins { - id("io.element.android-compose-library") - alias(libs.plugins.anvil) - alias(libs.plugins.ksp) -} - -android { - // TODO change the namespace (and your classes package) - namespace = "io.element.android.features.template" -} - -anvil { - generateDaggerFactories.set(true) -} - -dependencies { - anvil(projects.anvilcodegen) - implementation(projects.anvilannotations) - - implementation(projects.libraries.core) - implementation(projects.libraries.architecture) - implementation(projects.libraries.matrix.api) - implementation(projects.libraries.matrixui) - implementation(projects.libraries.designsystem) - implementation(projects.libraries.elementresources) - implementation(projects.libraries.uiStrings) - - testImplementation(libs.test.junit) - testImplementation(libs.coroutines.test) - testImplementation(libs.molecule.runtime) - testImplementation(libs.test.truth) - testImplementation(libs.test.turbine) - testImplementation(projects.libraries.matrix.test) - - androidTestImplementation(libs.test.junitext) - - ksp(libs.showkase.processor) -} diff --git a/features/template/consumer-rules.pro b/features/template/consumer-rules.pro deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/features/template/proguard-rules.pro b/features/template/proguard-rules.pro deleted file mode 100644 index 481bb43481..0000000000 --- a/features/template/proguard-rules.pro +++ /dev/null @@ -1,21 +0,0 @@ -# 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/features/template/src/main/AndroidManifest.xml b/features/template/src/main/AndroidManifest.xml deleted file mode 100644 index 86d497f107..0000000000 --- a/features/template/src/main/AndroidManifest.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - diff --git a/features/template/src/main/kotlin/io/element/android/features/template/TemplateEvents.kt b/features/template/src/main/kotlin/io/element/android/features/template/TemplateEvents.kt deleted file mode 100644 index 57d0b0cc25..0000000000 --- a/features/template/src/main/kotlin/io/element/android/features/template/TemplateEvents.kt +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright (c) 2023 New Vector Ltd - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.element.android.features.template - -// TODO Add your events or remove the file completely if no events -sealed interface TemplateEvents { - object MyEvent: TemplateEvents -} diff --git a/features/template/src/main/kotlin/io/element/android/features/template/TemplateNode.kt b/features/template/src/main/kotlin/io/element/android/features/template/TemplateNode.kt deleted file mode 100644 index 4be5178ede..0000000000 --- a/features/template/src/main/kotlin/io/element/android/features/template/TemplateNode.kt +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) 2023 New Vector Ltd - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.element.android.features.template - -import androidx.compose.runtime.Composable -import androidx.compose.ui.Modifier -import com.bumble.appyx.core.modality.BuildContext -import com.bumble.appyx.core.node.Node -import com.bumble.appyx.core.plugin.Plugin -import dagger.assisted.Assisted -import dagger.assisted.AssistedInject -import io.element.android.anvilannotations.ContributesNode -import io.element.android.libraries.di.AppScope - -// TODO Change to use the right Scope for your feature. For now it can be AppScope, SessionScope or RoomScope -@ContributesNode(AppScope::class) -class TemplateNode @AssistedInject constructor( - @Assisted buildContext: BuildContext, - @Assisted plugins: List, - private val presenter: TemplatePresenter, -) : Node(buildContext, plugins = plugins) { - - @Composable - override fun View(modifier: Modifier) { - val state = presenter.present() - TemplateView( - state = state, - modifier = modifier - ) - } -} diff --git a/features/template/src/main/kotlin/io/element/android/features/template/TemplatePresenter.kt b/features/template/src/main/kotlin/io/element/android/features/template/TemplatePresenter.kt deleted file mode 100644 index 254a5fc048..0000000000 --- a/features/template/src/main/kotlin/io/element/android/features/template/TemplatePresenter.kt +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2023 New Vector Ltd - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.element.android.features.template - -import androidx.compose.runtime.Composable -import io.element.android.libraries.architecture.Presenter -import javax.inject.Inject - -class TemplatePresenter @Inject constructor() : Presenter { - - @Composable - override fun present(): TemplateState { - - fun handleEvents(event: TemplateEvents) { - when (event) { - TemplateEvents.MyEvent -> Unit - } - } - - return TemplateState( - eventSink = ::handleEvents - ) - } -} diff --git a/features/template/src/main/kotlin/io/element/android/features/template/TemplateState.kt b/features/template/src/main/kotlin/io/element/android/features/template/TemplateState.kt deleted file mode 100644 index b9a48a7378..0000000000 --- a/features/template/src/main/kotlin/io/element/android/features/template/TemplateState.kt +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (c) 2023 New Vector Ltd - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.element.android.features.template - -// TODO add your ui models. Remove the eventSink if you don't have events. -// Do not use default value, so no member get forgotten in the presenters. -data class TemplateState( - val eventSink: (TemplateEvents) -> Unit -) diff --git a/features/template/src/main/kotlin/io/element/android/features/template/TemplateStateProvider.kt b/features/template/src/main/kotlin/io/element/android/features/template/TemplateStateProvider.kt deleted file mode 100644 index 7541e1667a..0000000000 --- a/features/template/src/main/kotlin/io/element/android/features/template/TemplateStateProvider.kt +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2023 New Vector Ltd - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.element.android.features.template - -import androidx.compose.ui.tooling.preview.PreviewParameterProvider - -open class TemplateStateProvider : PreviewParameterProvider { - override val values: Sequence - get() = sequenceOf( - aTemplateState(), - // Add other state here - ) -} - -fun aTemplateState() = TemplateState( - eventSink = {} -) diff --git a/features/template/src/main/kotlin/io/element/android/features/template/TemplateView.kt b/features/template/src/main/kotlin/io/element/android/features/template/TemplateView.kt deleted file mode 100644 index c7456ad49a..0000000000 --- a/features/template/src/main/kotlin/io/element/android/features/template/TemplateView.kt +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (c) 2022 New Vector Ltd - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.element.android.features.template - -import androidx.compose.foundation.layout.Box -import androidx.compose.material3.MaterialTheme -import androidx.compose.runtime.Composable -import androidx.compose.ui.Alignment -import androidx.compose.ui.Modifier -import androidx.compose.ui.tooling.preview.Preview -import androidx.compose.ui.tooling.preview.PreviewParameter -import io.element.android.libraries.designsystem.preview.ElementPreviewDark -import io.element.android.libraries.designsystem.preview.ElementPreviewLight -import io.element.android.libraries.designsystem.theme.components.Text - -@Composable -fun TemplateView( - state: TemplateState, - modifier: Modifier = Modifier, -) { - Box(modifier, contentAlignment = Alignment.Center) { - Text( - "Template feature view", - color = MaterialTheme.colorScheme.primary, - ) - } -} - -@Preview -@Composable -fun TemplateViewLightPreview(@PreviewParameter(TemplateStateProvider::class) state: TemplateState) = - ElementPreviewLight { ContentToPreview(state) } - -@Preview -@Composable -fun TemplateViewDarkPreview(@PreviewParameter(TemplateStateProvider::class) state: TemplateState) = - ElementPreviewDark { ContentToPreview(state) } - -@Composable -private fun ContentToPreview(state: TemplateState) { - TemplateView( - state = state, - ) -} diff --git a/features/template/src/test/kotlin/io/element/android/features/template/TemplatePresenterTests.kt b/features/template/src/test/kotlin/io/element/android/features/template/TemplatePresenterTests.kt deleted file mode 100644 index a14cd2761e..0000000000 --- a/features/template/src/test/kotlin/io/element/android/features/template/TemplatePresenterTests.kt +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) 2023 New Vector Ltd - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -@file:OptIn(ExperimentalCoroutinesApi::class) - -package io.element.android.features.template - -import app.cash.molecule.RecompositionClock -import app.cash.molecule.moleculeFlow -import app.cash.turbine.test -import com.google.common.truth.Truth.assertThat -import kotlinx.coroutines.ExperimentalCoroutinesApi -import kotlinx.coroutines.test.runTest -import org.junit.Test - -class TemplatePresenterTests { - - @Test - fun `present - initial state`() = runTest { - val presenter = TemplatePresenter() - moleculeFlow(RecompositionClock.Immediate) { - presenter.present() - }.test { - val initialState = awaitItem() - assertThat(initialState) - } - } - - @Test - fun `present - send event`() = runTest { - val presenter = TemplatePresenter() - moleculeFlow(RecompositionClock.Immediate) { - presenter.present() - }.test { - val initialState = awaitItem() - initialState.eventSink.invoke(TemplateEvents.MyEvent) - } - } -} From 61eae879d4164c2eab3e7e8a78e47a6e3f9ff61a Mon Sep 17 00:00:00 2001 From: ganfra Date: Fri, 24 Mar 2023 17:24:06 +0100 Subject: [PATCH 3/7] Share the template files and update documentation about it. --- docs/_developer_onboarding.md | 40 ++++++++++++++++++++++++++--- tools/templates/FeatureModule.json | 1 + tools/templates/file_templates.zip | Bin 0 -> 834 bytes 3 files changed, 37 insertions(+), 4 deletions(-) create mode 100644 tools/templates/FeatureModule.json create mode 100644 tools/templates/file_templates.zip diff --git a/docs/_developer_onboarding.md b/docs/_developer_onboarding.md index a526e0de33..b32d176a45 100644 --- a/docs/_developer_onboarding.md +++ b/docs/_developer_onboarding.md @@ -269,10 +269,42 @@ Here are the main points: #### Template and naming -There is a template module to easily start a new feature. When creating a new module, you can just copy paste the template. It is -located [here](../features/template). - -For the naming rules, please follow what is being currently used in the template module. +This documentation provides you with the steps to install and use the AS plugin for generating modules in your project. +The plugin and templates will help you quickly create new features with a standardized structure. + +##### A. Installation + +Follow these steps to install and configure the plugin and templates: + +1. Install the AS plugin for generating modules : + [Generate Module from Template](https://plugins.jetbrains.com/plugin/13586-generate-module-from-template) +2. Import file templates in AS : + - Navigate to File/Manage IDE Settings/Import Settings + - Pick the `tools/templates/file_templates.zip` files + - Click on OK +3. Configure generate-module-from-template plugin : + - Navigate to AS/Settings/Tools/Module Template Settings + - Click on + / Import From File + - Pick the `tools/templates/FeatureModule.json` + +Everything should be ready to use. + +##### B. Usage + +Example for a new feature called RoomDetails: + +1. Right-click on the features package and click on Create Module from Template +2. Fill the 2 text fields like so: + - MODULE_NAME = roomdetails + - FEATURE_NAME = RoomDetails +3. Click on Next +4. Verify that the structure looks ok and click on Finish +5. The modules api/impl should be created under `features/roomdetails` directory. +6. Sync project with Gradle so the modules are recognized (no need to add them to settings.gradle). +7. You can now add more Presentation classes (Events, State, StateProvider, View, Presenter) in the impl module with the `Template Presentation Classes`. + To use it, just right click on the package where you want to generate classes, and click on `Template Presentation Classes`. + Fill the text field with the base name of the classes, ie `RootRoomDetails` in the `root` package. + Note that naming of files and classes is important, since those names are used to set up code coverage rules. For instance, presenters MUST have a suffix `Presenter`,states MUST have a suffix `State`, etc. Also we want to have a common naming along all the modules. diff --git a/tools/templates/FeatureModule.json b/tools/templates/FeatureModule.json new file mode 100644 index 0000000000..9453a2b27b --- /dev/null +++ b/tools/templates/FeatureModule.json @@ -0,0 +1 @@ +{"template":{"name":"","isDir":true,"placeholders":{"MODULE_NAME":"","FEATURE_NAME":"","BUILD_GRADLE_API":"build.gradle.kts","BUILD_GRADLE_IMPL":"build.gradle.kts"},"fileTemplates":{"${FEATURE_NAME}EntryPoint":"Template Module Feature Entry Point API","Default${FEATURE_NAME}EntryPoint":"Template Module Feature Entry Point Flow Impl","${BUILD_GRADLE_API}":"Template Module Feature Build Gradle API","${BUILD_GRADLE_IMPL}":"Template Module Feature Build Gradle Impl","${FEATURE_NAME}FlowNode":"Template Module Feature Node Flow Impl"},"realChildren":[{"name":"${MODULE_NAME}","isDir":true,"realChildren":[{"name":"api","isDir":true,"realChildren":[{"name":"src","isDir":true,"realChildren":[{"name":"main","isDir":true,"realChildren":[{"name":"kotlin","isDir":true,"realChildren":[{"name":"io","isDir":true,"realChildren":[{"name":"element","isDir":true,"realChildren":[{"name":"android","isDir":true,"realChildren":[{"name":"features","isDir":true,"realChildren":[{"name":"${MODULE_NAME}","isDir":true,"realChildren":[{"name":"api","isDir":true,"realChildren":[{"name":"${FEATURE_NAME}EntryPoint","isDir":false,"placeholders":{},"fileTemplates":{},"realChildren":[]}]}]}]}]}]}]}]}]}]},{"name":"${BUILD_GRADLE_API}","isDir":false,"placeholders":{},"fileTemplates":{},"realChildren":[]}]},{"name":"impl","isDir":true,"realChildren":[{"name":"src","isDir":true,"realChildren":[{"name":"main","isDir":true,"realChildren":[{"name":"kotlin","isDir":true,"realChildren":[{"name":"io","isDir":true,"realChildren":[{"name":"element","isDir":true,"realChildren":[{"name":"android","isDir":true,"realChildren":[{"name":"features","isDir":true,"realChildren":[{"name":"${MODULE_NAME}","isDir":true,"realChildren":[{"name":"impl","isDir":true,"realChildren":[{"name":"Default${FEATURE_NAME}EntryPoint","isDir":false,"placeholders":{},"fileTemplates":{},"realChildren":[]},{"name":"${FEATURE_NAME}FlowNode","isDir":false,"placeholders":{},"fileTemplates":{},"realChildren":[]}]}]}]}]}]}]}]}]},{"name":"test","isDir":true,"realChildren":[{"name":"kotlin","isDir":true,"realChildren":[{"name":"element","isDir":true,"realChildren":[{"name":"android","isDir":true,"realChildren":[{"name":"features","isDir":true,"realChildren":[{"name":"${MODULE_NAME}","isDir":true,"realChildren":[{"name":"impl","isDir":true,"realChildren":[]}]}]}]}]}]}]}]},{"name":"${BUILD_GRADLE_IMPL}","isDir":false,"placeholders":{},"fileTemplates":{},"realChildren":[]}]}]}]},"language":"java","templateName":"FeatureModule","lowercaseDir":true,"capitalizeFile":false,"packageNameToDir":false} \ No newline at end of file diff --git a/tools/templates/file_templates.zip b/tools/templates/file_templates.zip new file mode 100644 index 0000000000000000000000000000000000000000..da6fcbec24b7df6904d960e0a62a2aa86f7260e2 GIT binary patch literal 834 zcmWIWW@Zs#;Nak3aA>LsV?Y8*Kz4pXNoIatv3^=+PO4r>YHmSJVo9oAacW6PW?p)+ zUPW%s*{S~CM+^jxzW=S+_F!x8|Gt+^9^apB+VChe$@uDq%%Dj(wL0$KU30sGT|467 zH!I`(d;FgcaopVI7Cvdq=F_YVD`GBNbx%8Rij6yL-y?+*dvhl|HguWJpS;7&h=pgu`wmCh+D(tYoP7Q3)v}t` z=@*SZL|EVV(31FRYhN_Fw1|NfYYrH;@4ld4)A8@Fl$_1#LCFPaGH&QApmEf@&W@jGq1QLF()TA zMX#iyB(%qn?~nnH>vx%BPAkk`9JtlE*QnRiM^;^8d61>;)QE)YOZESICI1@59^O*D z&MIv2hAT`HP4>=Q=;^=aLCCBH_1llk`^_6LH~MbC;){HpQ+W2?S}$arr}6xuiG$_6 zV;aW#q0j4oe|?j2`r$s7%S8Kx7TT&aWIzK$lSW}X|FhIBQ>-6RY%RVrId~wwM zh+H?&jfa64dP`W||gi{&1dC1NL1t|iA0;2#WfI(Wh7;yUop;elRps!egk;}lq420K!bQn+r G0|NkrW+b2h literal 0 HcmV?d00001 From cc476a4f477aeca795268d0d30cff6a463ec105b Mon Sep 17 00:00:00 2001 From: ganfra Date: Mon, 27 Mar 2023 12:56:52 +0200 Subject: [PATCH 4/7] [Template] Reexport file templates --- tools/templates/file_templates.zip | Bin 834 -> 6536 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/tools/templates/file_templates.zip b/tools/templates/file_templates.zip index da6fcbec24b7df6904d960e0a62a2aa86f7260e2..6a84058cff3d0870b690e69719fbe6258ecc5ac6 100644 GIT binary patch literal 6536 zcmbVQ1yodxwjLUk7-^6gLIjBc1Vy@G$N?!wx?=!=AtVGOq#Hz#Mx>OI?iP?vNeNLJ zK|(^_%zgiTBKPV4U-zuD)>(7TKHu54}2rw%-^MLD?FPvBRnx`L37;y2G`_%bth~oJX$i^ zdpS)|y_9=$G1j|L`f9KzNyLHCtJVGNZ!XX)H`*UXCS3mX_F)Hdq2)V(|k+B%#Hd{edZWUcpz|Ok4(`$=2 zx2535+F+~b;xxn`yvk_yPn|wGmIy>Pn5k&teGJR}F!p+|g+AK>UE0ZjvFhzN*~0No%*Vj&AK$P(EpZQR6w^*V#4e)} zj!0eRe&!z#W#Q1)xk2jOlGuG&iqK!>ZSGRbi!T_V&lNT_B0OiN+eKRmH3Llo?^t(k zk@t_JVzRx_jZ%u2T2YW}xb}ulYIP(ww=IC(YX{(MPuO9~Qn)vt1g%H!aUmMAT+5B? zg90TnMZUOeyQm20HpTO7m(yUr-pY|=j0e#u5Xh`y8(~USJFVrHjCgAYI($^SYUuUV zQwYBv&F=`JCZ#C)dX>7`b9ahwyVM8#YC5Q);U$ERxhee*MBDKKKeyQ}46r(I2l>_J zZA7NOxb`9j*isw%neq0lS2dW!sW9R6*;d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|@*P`|2Z|B??;h}?6|~5!5Ick!9B!omf=J6q zfaKuz#zt_^T{8s2%FeU4?n-V_}PejUuWi9aob!wfMah528ulOI{F|U(1UgSePz3LX zVB`H$p#P+M7g5g7vM5^fLtK!_^3U9M9_4(?y@+*w0{ru>S~H7j4lIX_GM zj5CO=cE7OcZ*Wl4ED)1EMznT0EEaN7@0p(NCg1ke*iyBEjR!G delta 556 zcmeA$KEzfZ;LXe;!ob17!QjwT5ypT7lz{B~f|AVqykh;d%$!uclGNOSoWzn;z2el8 zlFYpHV!evooU>E?y^k0O9DV;=v+cpw-v50sn>@Zh+qB_PXp-^O4VgicZfbShzq{sk z2fKE}!EaW^`Sl;?YT(;_-cHk5nci6ry=O)(}?6}01zcI5{ z<&M(CZT*e1CV@*gOsjVOe&ze&jdIp2FRl0HPIzqSGMztphnW!z&xH3Kjn^`axgK)h|G84L16#|u)DKw7AJ}>MhYjPoqyFp77|%at@W1IAD8Z{zF-!9A?SHDz zHgo-4qhzTSD446zGD?yyB9?oSf7Yy^@L&kRmPy kE(Qh;28=kCMX^zuX|jrlq6jO{{R|AuKzI#EhcSV80Mc2+$p8QV From 019aa0eccacd0b60340682207404e3cedee663ab Mon Sep 17 00:00:00 2001 From: ganfra Date: Mon, 27 Mar 2023 16:19:21 +0200 Subject: [PATCH 5/7] [Templates] Re-export with some fixes --- tools/templates/FeatureModule.json | 2 +- tools/templates/file_templates.zip | Bin 6536 -> 6959 bytes 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/templates/FeatureModule.json b/tools/templates/FeatureModule.json index 9453a2b27b..4ad5e3a676 100644 --- a/tools/templates/FeatureModule.json +++ b/tools/templates/FeatureModule.json @@ -1 +1 @@ -{"template":{"name":"","isDir":true,"placeholders":{"MODULE_NAME":"","FEATURE_NAME":"","BUILD_GRADLE_API":"build.gradle.kts","BUILD_GRADLE_IMPL":"build.gradle.kts"},"fileTemplates":{"${FEATURE_NAME}EntryPoint":"Template Module Feature Entry Point API","Default${FEATURE_NAME}EntryPoint":"Template Module Feature Entry Point Flow Impl","${BUILD_GRADLE_API}":"Template Module Feature Build Gradle API","${BUILD_GRADLE_IMPL}":"Template Module Feature Build Gradle Impl","${FEATURE_NAME}FlowNode":"Template Module Feature Node Flow Impl"},"realChildren":[{"name":"${MODULE_NAME}","isDir":true,"realChildren":[{"name":"api","isDir":true,"realChildren":[{"name":"src","isDir":true,"realChildren":[{"name":"main","isDir":true,"realChildren":[{"name":"kotlin","isDir":true,"realChildren":[{"name":"io","isDir":true,"realChildren":[{"name":"element","isDir":true,"realChildren":[{"name":"android","isDir":true,"realChildren":[{"name":"features","isDir":true,"realChildren":[{"name":"${MODULE_NAME}","isDir":true,"realChildren":[{"name":"api","isDir":true,"realChildren":[{"name":"${FEATURE_NAME}EntryPoint","isDir":false,"placeholders":{},"fileTemplates":{},"realChildren":[]}]}]}]}]}]}]}]}]}]},{"name":"${BUILD_GRADLE_API}","isDir":false,"placeholders":{},"fileTemplates":{},"realChildren":[]}]},{"name":"impl","isDir":true,"realChildren":[{"name":"src","isDir":true,"realChildren":[{"name":"main","isDir":true,"realChildren":[{"name":"kotlin","isDir":true,"realChildren":[{"name":"io","isDir":true,"realChildren":[{"name":"element","isDir":true,"realChildren":[{"name":"android","isDir":true,"realChildren":[{"name":"features","isDir":true,"realChildren":[{"name":"${MODULE_NAME}","isDir":true,"realChildren":[{"name":"impl","isDir":true,"realChildren":[{"name":"Default${FEATURE_NAME}EntryPoint","isDir":false,"placeholders":{},"fileTemplates":{},"realChildren":[]},{"name":"${FEATURE_NAME}FlowNode","isDir":false,"placeholders":{},"fileTemplates":{},"realChildren":[]}]}]}]}]}]}]}]}]},{"name":"test","isDir":true,"realChildren":[{"name":"kotlin","isDir":true,"realChildren":[{"name":"element","isDir":true,"realChildren":[{"name":"android","isDir":true,"realChildren":[{"name":"features","isDir":true,"realChildren":[{"name":"${MODULE_NAME}","isDir":true,"realChildren":[{"name":"impl","isDir":true,"realChildren":[]}]}]}]}]}]}]}]},{"name":"${BUILD_GRADLE_IMPL}","isDir":false,"placeholders":{},"fileTemplates":{},"realChildren":[]}]}]}]},"language":"java","templateName":"FeatureModule","lowercaseDir":true,"capitalizeFile":false,"packageNameToDir":false} \ No newline at end of file +{"template":{"name":"","isDir":true,"placeholders":{"MODULE_NAME":"","FEATURE_NAME":"","BUILD_GRADLE_API":"build.gradle.kts","BUILD_GRADLE_IMPL":"build.gradle.kts"},"fileTemplates":{"${FEATURE_NAME}EntryPoint":"Template Module Feature Entry Point API","Default${FEATURE_NAME}EntryPoint":"Template Module Feature Entry Point Flow Impl","${BUILD_GRADLE_API}":"Template Module Feature Build Gradle API","${BUILD_GRADLE_IMPL}":"Template Module Feature Build Gradle Impl","${FEATURE_NAME}FlowNode":"Template Module Feature Node Flow Impl"},"realChildren":[{"name":"${MODULE_NAME}","isDir":true,"realChildren":[{"name":"api","isDir":true,"realChildren":[{"name":"src","isDir":true,"realChildren":[{"name":"main","isDir":true,"realChildren":[{"name":"kotlin","isDir":true,"realChildren":[{"name":"io","isDir":true,"realChildren":[{"name":"element","isDir":true,"realChildren":[{"name":"android","isDir":true,"realChildren":[{"name":"features","isDir":true,"realChildren":[{"name":"${MODULE_NAME}","isDir":true,"realChildren":[{"name":"api","isDir":true,"realChildren":[{"name":"${FEATURE_NAME}EntryPoint","isDir":false,"placeholders":{},"fileTemplates":{},"realChildren":[]}]}]}]}]}]}]}]}]}]},{"name":"${BUILD_GRADLE_API}","isDir":false,"placeholders":{},"fileTemplates":{},"realChildren":[]}]},{"name":"impl","isDir":true,"realChildren":[{"name":"src","isDir":true,"realChildren":[{"name":"main","isDir":true,"realChildren":[{"name":"kotlin","isDir":true,"realChildren":[{"name":"io","isDir":true,"realChildren":[{"name":"element","isDir":true,"realChildren":[{"name":"android","isDir":true,"realChildren":[{"name":"features","isDir":true,"realChildren":[{"name":"${MODULE_NAME}","isDir":true,"realChildren":[{"name":"impl","isDir":true,"realChildren":[{"name":"Default${FEATURE_NAME}EntryPoint","isDir":false,"placeholders":{},"fileTemplates":{},"realChildren":[]},{"name":"${FEATURE_NAME}FlowNode","isDir":false,"placeholders":{},"fileTemplates":{},"realChildren":[]}]}]}]}]}]}]}]}]},{"name":"test","isDir":true,"realChildren":[{"name":"kotlin","isDir":true,"realChildren":[{"name":"io","isDir":true,"realChildren":[{"name":"element","isDir":true,"realChildren":[{"name":"android","isDir":true,"realChildren":[{"name":"features","isDir":true,"realChildren":[{"name":"${MODULE_NAME}","isDir":true,"realChildren":[{"name":"impl","isDir":true,"realChildren":[]}]}]}]}]}]}]}]}]},{"name":"${BUILD_GRADLE_IMPL}","isDir":false,"placeholders":{},"fileTemplates":{},"realChildren":[]}]}]}]},"language":"java","templateName":"FeatureModule","lowercaseDir":true,"capitalizeFile":false,"packageNameToDir":false} \ No newline at end of file diff --git a/tools/templates/file_templates.zip b/tools/templates/file_templates.zip index 6a84058cff3d0870b690e69719fbe6258ecc5ac6..aca8e8df5847bca7bd9a6cd6ce87a9e1e4d3afd8 100644 GIT binary patch delta 1401 zcmeA$UT?NRfRpKF-ee(8@A|-ld50Bv_CD9Hd7(I2?fbmwYfG1JUA^q9jbK5P2~$VY z6^&Q>`&CMMcdeA^X`Mg+zVWn=`DF?d*gONhZz*3sB&oSU@mcd?VZC2xf4}~>_Sdax zvtKoxIi)jst?4;tbKPqT*NPrZzdd)NwEGRIgHyi9?qgYb%YaZCvO?5FRpm@Be3dGvuKR}G_AL>+l_;MXQ*@)^FC(ju8W;I|9AhB z&umRh|4f|brwaHBoABInU;d=%bj%e)3C)C#^8x3}0uIzD`wOdV^{X+r+#Dps_LAqb zMewS=|I^|pGlgmHUOcC~*Xk3Cg!c5`6T_z&W>nnzkn^F4bE&|EnGfn%=Lq?#{9+97 zX6INM`DvO6BLjm669YqlH#3U}0|y5OgKfj)Ca&aqO;;x-v5luCEzfP?vDj9gGd*m@ z|9yV5rZ`N`IM`nJ+y)hVh1Th}f*wm~diu+(&`+5xSeeu?PD9iFLs z&c58?pqzI*_eTAz|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|WQ) zuLa5tE)*`KiwH`+wj2?C)D^lY4X8Ush0LT~rggzY`c)6Ip9%MIyqD#QUN4_(8$1G$AApVxF#Q9k({i+&OdpA1kdCPTs)KcB(<1k z^8ke{CKpNSF Date: Mon, 27 Mar 2023 17:18:11 +0200 Subject: [PATCH 6/7] Remove old template project from settings.gradle --- settings.gradle.kts | 1 - 1 file changed, 1 deletion(-) diff --git a/settings.gradle.kts b/settings.gradle.kts index 4cab3cca2a..fcdd72ba4a 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -58,7 +58,6 @@ include(":tests:uitests") include(":anvilannotations") include(":anvilcodegen") include(":libraries:architecture") -include(":features:template") include(":libraries:androidutils") include(":samples:minimal") include(":libraries:encrypted-db") From d5bc8923b9774fb42787f604d9378e117bb2fbf6 Mon Sep 17 00:00:00 2001 From: ganfra Date: Mon, 27 Mar 2023 17:43:02 +0200 Subject: [PATCH 7/7] [Templates] changes after review --- docs/_developer_onboarding.md | 4 ++-- tools/templates/file_templates.zip | Bin 6959 -> 6484 bytes 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/_developer_onboarding.md b/docs/_developer_onboarding.md index b32d176a45..9b07f37daf 100644 --- a/docs/_developer_onboarding.md +++ b/docs/_developer_onboarding.md @@ -272,7 +272,7 @@ Here are the main points: This documentation provides you with the steps to install and use the AS plugin for generating modules in your project. The plugin and templates will help you quickly create new features with a standardized structure. -##### A. Installation +A. Installation Follow these steps to install and configure the plugin and templates: @@ -289,7 +289,7 @@ Follow these steps to install and configure the plugin and templates: Everything should be ready to use. -##### B. Usage +B. Usage Example for a new feature called RoomDetails: diff --git a/tools/templates/file_templates.zip b/tools/templates/file_templates.zip index aca8e8df5847bca7bd9a6cd6ce87a9e1e4d3afd8..7352ac307453a53d853bbdb03c3c643c6ed0939d 100644 GIT binary patch delta 1488 zcmZ2)cExCd5hKIo`=a8LS;VY1wk%+jWM&azVBp|jxRq8NHly#*B56hj25Tk;2K~v5 zVn&bI7Cd*CUA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