From f0ef559e3487d129d16881616f5679dfc3a1de46 Mon Sep 17 00:00:00 2001 From: Kuzniarski Jacek Date: Mon, 23 Oct 2017 13:41:14 +0200 Subject: [PATCH] Phase out scoping for dagger --- .../InFullMvpActivityJava/globals.xml.ftl | 1 - .../InFullMvpActivityJava/recipe.xml.ftl | 3 --- .../root/src/mvp_folder/di/Graph.java.ftl | 1 - .../root/src/mvp_folder/di/Module.java.ftl | 4 ---- .../root/src/mvp_folder/di/Scope.java.ftl | 11 ----------- .../InFullMvpActivityJava_dagger2.11+/globals.xml.ftl | 1 - .../InFullMvpActivityJava_dagger2.11+/recipe.xml.ftl | 3 --- .../root/src/mvp_folder/di/ComponentClass.java.ftl | 1 - .../root/src/mvp_folder/di/Module.java.ftl | 4 ---- .../root/src/mvp_folder/di/Scope.java.ftl | 11 ----------- .../InFullMvpActivityJava_dagger2.11+/template.xml | 8 -------- .../InFullMvpActivityKotlin/globals.xml.ftl | 1 - .../InFullMvpActivityKotlin/recipe.xml.ftl | 3 --- .../root/src/mvp_folder/di/Graph.java.ftl | 1 - .../root/src/mvp_folder/di/Module.java.ftl | 4 ---- .../root/src/mvp_folder/di/Scope.java.ftl | 11 ----------- .../globals.xml.ftl | 1 - .../recipe.xml.ftl | 3 --- .../root/src/mvp_folder/di/Component.kt.ftl | 2 -- .../root/src/mvp_folder/di/Module.java.ftl | 4 ---- .../root/src/mvp_folder/di/Scope.java.ftl | 11 ----------- .../InFullMvpActivityKotlin_dagger2.11+/template.xml | 10 +--------- .../InFullMvpFragmentJava/globals.xml.ftl | 1 - .../InFullMvpFragmentJava/recipe.xml.ftl | 3 --- .../root/src/mvp_folder/di/Graph.java.ftl | 1 - .../root/src/mvp_folder/di/Module.java.ftl | 3 --- .../root/src/mvp_folder/di/Scope.java.ftl | 11 ----------- .../InFullMvpFragmentJava_dagger2.11+/globals.xml.ftl | 1 - .../InFullMvpFragmentJava_dagger2.11+/recipe.xml.ftl | 3 --- .../root/src/mvp_folder/di/Component.java.ftl | 2 -- .../root/src/mvp_folder/di/Module.java.ftl | 5 ----- .../root/src/mvp_folder/di/Scope.java.ftl | 11 ----------- .../InFullMvpFragmentJava_dagger2.11+/template.xml | 8 -------- .../InFullMvpFragmentKotlin/globals.xml.ftl | 1 - .../InFullMvpFragmentKotlin/recipe.xml.ftl | 3 --- .../root/src/mvp_folder/di/Graph.java.ftl | 1 - .../root/src/mvp_folder/di/Module.java.ftl | 3 --- .../root/src/mvp_folder/di/Scope.java.ftl | 11 ----------- .../globals.xml.ftl | 1 - .../recipe.xml.ftl | 3 --- .../root/src/mvp_folder/di/Component.kt.ftl | 1 - .../root/src/mvp_folder/di/Module.java.ftl | 4 ---- .../root/src/mvp_folder/di/Scope.java.ftl | 11 ----------- .../InFullMvpFragmentKotlin_dagger2.11+/template.xml | 10 +--------- .../src/mvp_folder/di/ApplicationComponent.kt.ftl | 1 - .../root/src/mvp_folder/di/BuildersModule.kt.ftl | 3 +-- .../InfullAplicationKotlin_dagger2.11+/template.xml | 3 +-- 47 files changed, 4 insertions(+), 200 deletions(-) delete mode 100644 android-studio-plugin/InFullMvpActivityJava/root/src/mvp_folder/di/Scope.java.ftl delete mode 100644 android-studio-plugin/InFullMvpActivityJava_dagger2.11+/root/src/mvp_folder/di/Scope.java.ftl delete mode 100644 android-studio-plugin/InFullMvpActivityKotlin/root/src/mvp_folder/di/Scope.java.ftl delete mode 100644 android-studio-plugin/InFullMvpActivityKotlin_dagger2.11+/root/src/mvp_folder/di/Scope.java.ftl delete mode 100644 android-studio-plugin/InFullMvpFragmentJava/root/src/mvp_folder/di/Scope.java.ftl delete mode 100644 android-studio-plugin/InFullMvpFragmentJava_dagger2.11+/root/src/mvp_folder/di/Scope.java.ftl delete mode 100644 android-studio-plugin/InFullMvpFragmentKotlin/root/src/mvp_folder/di/Scope.java.ftl delete mode 100644 android-studio-plugin/InFullMvpFragmentKotlin_dagger2.11+/root/src/mvp_folder/di/Scope.java.ftl diff --git a/android-studio-plugin/InFullMvpActivityJava/globals.xml.ftl b/android-studio-plugin/InFullMvpActivityJava/globals.xml.ftl index 3e5ab0b..2a72b30 100644 --- a/android-studio-plugin/InFullMvpActivityJava/globals.xml.ftl +++ b/android-studio-plugin/InFullMvpActivityJava/globals.xml.ftl @@ -4,7 +4,6 @@ - diff --git a/android-studio-plugin/InFullMvpActivityJava/recipe.xml.ftl b/android-studio-plugin/InFullMvpActivityJava/recipe.xml.ftl index 7083f32..51daa6e 100644 --- a/android-studio-plugin/InFullMvpActivityJava/recipe.xml.ftl +++ b/android-studio-plugin/InFullMvpActivityJava/recipe.xml.ftl @@ -27,9 +27,6 @@ - - diff --git a/android-studio-plugin/InFullMvpActivityJava/root/src/mvp_folder/di/Graph.java.ftl b/android-studio-plugin/InFullMvpActivityJava/root/src/mvp_folder/di/Graph.java.ftl index c952b8d..c22391f 100644 --- a/android-studio-plugin/InFullMvpActivityJava/root/src/mvp_folder/di/Graph.java.ftl +++ b/android-studio-plugin/InFullMvpActivityJava/root/src/mvp_folder/di/Graph.java.ftl @@ -34,7 +34,6 @@ public class ${graphClass} { builder.${moduleClass?uncap_first}(module); } - @${scopeClass} @Component( <#if useApplicationComponent> dependencies = ApplicationComponent.class, diff --git a/android-studio-plugin/InFullMvpActivityJava/root/src/mvp_folder/di/Module.java.ftl b/android-studio-plugin/InFullMvpActivityJava/root/src/mvp_folder/di/Module.java.ftl index 4ede29d..aaa8fa1 100644 --- a/android-studio-plugin/InFullMvpActivityJava/root/src/mvp_folder/di/Module.java.ftl +++ b/android-studio-plugin/InFullMvpActivityJava/root/src/mvp_folder/di/Module.java.ftl @@ -19,25 +19,21 @@ public class ${moduleClass} { this.activity = activity; } - @${scopeClass} @Provides Context providesContext() { return activity; } - @${scopeClass} @Provides ${viewClass} provides${viewClass}() { return new ${viewClass}(); } - @${scopeClass} @Provides public ${modelClass} provides${modelClass}() { return new ${modelClass}(); } - @${scopeClass} @Provides public ${presenterClass} provides${presenterClass}( ${viewClass} view, diff --git a/android-studio-plugin/InFullMvpActivityJava/root/src/mvp_folder/di/Scope.java.ftl b/android-studio-plugin/InFullMvpActivityJava/root/src/mvp_folder/di/Scope.java.ftl deleted file mode 100644 index 65aa904..0000000 --- a/android-studio-plugin/InFullMvpActivityJava/root/src/mvp_folder/di/Scope.java.ftl +++ /dev/null @@ -1,11 +0,0 @@ -package ${relativePackage}.di; - -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; - -import javax.inject.Scope; - -@Retention(RetentionPolicy.RUNTIME) -@Scope -public @interface ${scopeClass} { -} diff --git a/android-studio-plugin/InFullMvpActivityJava_dagger2.11+/globals.xml.ftl b/android-studio-plugin/InFullMvpActivityJava_dagger2.11+/globals.xml.ftl index 3e5ab0b..2a72b30 100644 --- a/android-studio-plugin/InFullMvpActivityJava_dagger2.11+/globals.xml.ftl +++ b/android-studio-plugin/InFullMvpActivityJava_dagger2.11+/globals.xml.ftl @@ -4,7 +4,6 @@ - diff --git a/android-studio-plugin/InFullMvpActivityJava_dagger2.11+/recipe.xml.ftl b/android-studio-plugin/InFullMvpActivityJava_dagger2.11+/recipe.xml.ftl index c9bb80e..d9eb6ad 100644 --- a/android-studio-plugin/InFullMvpActivityJava_dagger2.11+/recipe.xml.ftl +++ b/android-studio-plugin/InFullMvpActivityJava_dagger2.11+/recipe.xml.ftl @@ -27,9 +27,6 @@ - - diff --git a/android-studio-plugin/InFullMvpActivityJava_dagger2.11+/root/src/mvp_folder/di/ComponentClass.java.ftl b/android-studio-plugin/InFullMvpActivityJava_dagger2.11+/root/src/mvp_folder/di/ComponentClass.java.ftl index ccad15d..e2c4e54 100644 --- a/android-studio-plugin/InFullMvpActivityJava_dagger2.11+/root/src/mvp_folder/di/ComponentClass.java.ftl +++ b/android-studio-plugin/InFullMvpActivityJava_dagger2.11+/root/src/mvp_folder/di/ComponentClass.java.ftl @@ -4,7 +4,6 @@ import ${relativePackage}.${activityClass}; import dagger.Subcomponent; import dagger.android.AndroidInjector; -@${scopeClass} @Subcomponent public interface ${componentClass} { diff --git a/android-studio-plugin/InFullMvpActivityJava_dagger2.11+/root/src/mvp_folder/di/Module.java.ftl b/android-studio-plugin/InFullMvpActivityJava_dagger2.11+/root/src/mvp_folder/di/Module.java.ftl index a14ab98..e8e4506 100644 --- a/android-studio-plugin/InFullMvpActivityJava_dagger2.11+/root/src/mvp_folder/di/Module.java.ftl +++ b/android-studio-plugin/InFullMvpActivityJava_dagger2.11+/root/src/mvp_folder/di/Module.java.ftl @@ -14,23 +14,19 @@ import dagger.Provides; @Module public abstract class ${moduleClass} { - @${scopeClass} @Binds abstract Context bindsContext(${activityClass} activity); - @${scopeClass} @Provides static ${viewClass} provides${viewClass}() { return new ${viewClass}(); } - @${scopeClass} @Provides static ${modelClass} provides${modelClass}() { return new ${modelClass}(); } - @${scopeClass} @Provides static ${presenterClass} provides${ presenterClass}(${modelClass} model, diff --git a/android-studio-plugin/InFullMvpActivityJava_dagger2.11+/root/src/mvp_folder/di/Scope.java.ftl b/android-studio-plugin/InFullMvpActivityJava_dagger2.11+/root/src/mvp_folder/di/Scope.java.ftl deleted file mode 100644 index 65aa904..0000000 --- a/android-studio-plugin/InFullMvpActivityJava_dagger2.11+/root/src/mvp_folder/di/Scope.java.ftl +++ /dev/null @@ -1,11 +0,0 @@ -package ${relativePackage}.di; - -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; - -import javax.inject.Scope; - -@Retention(RetentionPolicy.RUNTIME) -@Scope -public @interface ${scopeClass} { -} diff --git a/android-studio-plugin/InFullMvpActivityJava_dagger2.11+/template.xml b/android-studio-plugin/InFullMvpActivityJava_dagger2.11+/template.xml index ab8881a..480d7e5 100644 --- a/android-studio-plugin/InFullMvpActivityJava_dagger2.11+/template.xml +++ b/android-studio-plugin/InFullMvpActivityJava_dagger2.11+/template.xml @@ -40,20 +40,12 @@ suggest="${applicationPackage}" help="Path to .R of this app/module" /> - - diff --git a/android-studio-plugin/InFullMvpActivityKotlin/globals.xml.ftl b/android-studio-plugin/InFullMvpActivityKotlin/globals.xml.ftl index 3e5ab0b..2a72b30 100644 --- a/android-studio-plugin/InFullMvpActivityKotlin/globals.xml.ftl +++ b/android-studio-plugin/InFullMvpActivityKotlin/globals.xml.ftl @@ -4,7 +4,6 @@ - diff --git a/android-studio-plugin/InFullMvpActivityKotlin/recipe.xml.ftl b/android-studio-plugin/InFullMvpActivityKotlin/recipe.xml.ftl index 30c6fd2..8f8c99b 100644 --- a/android-studio-plugin/InFullMvpActivityKotlin/recipe.xml.ftl +++ b/android-studio-plugin/InFullMvpActivityKotlin/recipe.xml.ftl @@ -27,9 +27,6 @@ - - diff --git a/android-studio-plugin/InFullMvpActivityKotlin/root/src/mvp_folder/di/Graph.java.ftl b/android-studio-plugin/InFullMvpActivityKotlin/root/src/mvp_folder/di/Graph.java.ftl index c952b8d..c22391f 100644 --- a/android-studio-plugin/InFullMvpActivityKotlin/root/src/mvp_folder/di/Graph.java.ftl +++ b/android-studio-plugin/InFullMvpActivityKotlin/root/src/mvp_folder/di/Graph.java.ftl @@ -34,7 +34,6 @@ public class ${graphClass} { builder.${moduleClass?uncap_first}(module); } - @${scopeClass} @Component( <#if useApplicationComponent> dependencies = ApplicationComponent.class, diff --git a/android-studio-plugin/InFullMvpActivityKotlin/root/src/mvp_folder/di/Module.java.ftl b/android-studio-plugin/InFullMvpActivityKotlin/root/src/mvp_folder/di/Module.java.ftl index 9b3fe86..95a3d60 100644 --- a/android-studio-plugin/InFullMvpActivityKotlin/root/src/mvp_folder/di/Module.java.ftl +++ b/android-studio-plugin/InFullMvpActivityKotlin/root/src/mvp_folder/di/Module.java.ftl @@ -19,25 +19,21 @@ public class ${moduleClass} { this.activity = activity; } - @${scopeClass} @Provides Context providesContext() { return activity; } - @${scopeClass} @Provides ${viewClass} provides${viewClass}() { return new ${viewClass}(); } - @${scopeClass} @Provides public ${modelClass} provides${modelClass}() { return new ${modelClass}(); } - @${scopeClass} @Provides public ${presenterClass} provides${presenterClass}( ${modelClass} model, diff --git a/android-studio-plugin/InFullMvpActivityKotlin/root/src/mvp_folder/di/Scope.java.ftl b/android-studio-plugin/InFullMvpActivityKotlin/root/src/mvp_folder/di/Scope.java.ftl deleted file mode 100644 index 65aa904..0000000 --- a/android-studio-plugin/InFullMvpActivityKotlin/root/src/mvp_folder/di/Scope.java.ftl +++ /dev/null @@ -1,11 +0,0 @@ -package ${relativePackage}.di; - -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; - -import javax.inject.Scope; - -@Retention(RetentionPolicy.RUNTIME) -@Scope -public @interface ${scopeClass} { -} diff --git a/android-studio-plugin/InFullMvpActivityKotlin_dagger2.11+/globals.xml.ftl b/android-studio-plugin/InFullMvpActivityKotlin_dagger2.11+/globals.xml.ftl index 3e5ab0b..2a72b30 100644 --- a/android-studio-plugin/InFullMvpActivityKotlin_dagger2.11+/globals.xml.ftl +++ b/android-studio-plugin/InFullMvpActivityKotlin_dagger2.11+/globals.xml.ftl @@ -4,7 +4,6 @@ - diff --git a/android-studio-plugin/InFullMvpActivityKotlin_dagger2.11+/recipe.xml.ftl b/android-studio-plugin/InFullMvpActivityKotlin_dagger2.11+/recipe.xml.ftl index 46b81bb..9648334 100644 --- a/android-studio-plugin/InFullMvpActivityKotlin_dagger2.11+/recipe.xml.ftl +++ b/android-studio-plugin/InFullMvpActivityKotlin_dagger2.11+/recipe.xml.ftl @@ -27,9 +27,6 @@ - - diff --git a/android-studio-plugin/InFullMvpActivityKotlin_dagger2.11+/root/src/mvp_folder/di/Component.kt.ftl b/android-studio-plugin/InFullMvpActivityKotlin_dagger2.11+/root/src/mvp_folder/di/Component.kt.ftl index 4551c82..61865bb 100644 --- a/android-studio-plugin/InFullMvpActivityKotlin_dagger2.11+/root/src/mvp_folder/di/Component.kt.ftl +++ b/android-studio-plugin/InFullMvpActivityKotlin_dagger2.11+/root/src/mvp_folder/di/Component.kt.ftl @@ -1,13 +1,11 @@ package ${relativePackage}.di import ${relativePackage}.${activityClass} -import ${relativePackage}.di.${scopeClass} import dagger.Subcomponent import dagger.android.AndroidInjector import dagger.Component -@${scopeClass} @Subcomponent interface ${componentClass} : AndroidInjector<${activityClass}> { diff --git a/android-studio-plugin/InFullMvpActivityKotlin_dagger2.11+/root/src/mvp_folder/di/Module.java.ftl b/android-studio-plugin/InFullMvpActivityKotlin_dagger2.11+/root/src/mvp_folder/di/Module.java.ftl index 1f4abf3..dbcdbc2 100644 --- a/android-studio-plugin/InFullMvpActivityKotlin_dagger2.11+/root/src/mvp_folder/di/Module.java.ftl +++ b/android-studio-plugin/InFullMvpActivityKotlin_dagger2.11+/root/src/mvp_folder/di/Module.java.ftl @@ -14,23 +14,19 @@ import dagger.Provides; @Module public abstract class ${moduleClass} { - @${scopeClass} @Binds abstract Context bindsContext(${activityClass} activity); - @${scopeClass} @Provides static ${viewClass} provides${viewClass}() { return new ${viewClass}(); } - @${scopeClass} @Provides static ${modelClass} provides${modelClass}() { return new ${modelClass}(); } - @${scopeClass} @Provides static ${presenterClass} provides${ presenterClass}(${modelClass} model, diff --git a/android-studio-plugin/InFullMvpActivityKotlin_dagger2.11+/root/src/mvp_folder/di/Scope.java.ftl b/android-studio-plugin/InFullMvpActivityKotlin_dagger2.11+/root/src/mvp_folder/di/Scope.java.ftl deleted file mode 100644 index 65aa904..0000000 --- a/android-studio-plugin/InFullMvpActivityKotlin_dagger2.11+/root/src/mvp_folder/di/Scope.java.ftl +++ /dev/null @@ -1,11 +0,0 @@ -package ${relativePackage}.di; - -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; - -import javax.inject.Scope; - -@Retention(RetentionPolicy.RUNTIME) -@Scope -public @interface ${scopeClass} { -} diff --git a/android-studio-plugin/InFullMvpActivityKotlin_dagger2.11+/template.xml b/android-studio-plugin/InFullMvpActivityKotlin_dagger2.11+/template.xml index f8d2bed..aea2ef4 100644 --- a/android-studio-plugin/InFullMvpActivityKotlin_dagger2.11+/template.xml +++ b/android-studio-plugin/InFullMvpActivityKotlin_dagger2.11+/template.xml @@ -40,21 +40,13 @@ suggest="${applicationPackage}" type="string"/> - - + type="string"/> ifmdagger.png diff --git a/android-studio-plugin/InFullMvpFragmentJava/globals.xml.ftl b/android-studio-plugin/InFullMvpFragmentJava/globals.xml.ftl index 4261603..9984702 100644 --- a/android-studio-plugin/InFullMvpFragmentJava/globals.xml.ftl +++ b/android-studio-plugin/InFullMvpFragmentJava/globals.xml.ftl @@ -4,7 +4,6 @@ - diff --git a/android-studio-plugin/InFullMvpFragmentJava/recipe.xml.ftl b/android-studio-plugin/InFullMvpFragmentJava/recipe.xml.ftl index d966e60..1f5b061 100644 --- a/android-studio-plugin/InFullMvpFragmentJava/recipe.xml.ftl +++ b/android-studio-plugin/InFullMvpFragmentJava/recipe.xml.ftl @@ -24,9 +24,6 @@ - - diff --git a/android-studio-plugin/InFullMvpFragmentJava/root/src/mvp_folder/di/Graph.java.ftl b/android-studio-plugin/InFullMvpFragmentJava/root/src/mvp_folder/di/Graph.java.ftl index c0f042f..67ae4da 100644 --- a/android-studio-plugin/InFullMvpFragmentJava/root/src/mvp_folder/di/Graph.java.ftl +++ b/android-studio-plugin/InFullMvpFragmentJava/root/src/mvp_folder/di/Graph.java.ftl @@ -32,7 +32,6 @@ public class ${graphClass} { builder.${moduleClass?uncap_first}(module); } - @${scopeClass} @Component( <#if useApplicationComponent> dependencies = ApplicationComponent.class, diff --git a/android-studio-plugin/InFullMvpFragmentJava/root/src/mvp_folder/di/Module.java.ftl b/android-studio-plugin/InFullMvpFragmentJava/root/src/mvp_folder/di/Module.java.ftl index 06d8439..03bbf6c 100644 --- a/android-studio-plugin/InFullMvpFragmentJava/root/src/mvp_folder/di/Module.java.ftl +++ b/android-studio-plugin/InFullMvpFragmentJava/root/src/mvp_folder/di/Module.java.ftl @@ -17,19 +17,16 @@ public class ${moduleClass} { this.fragment = fragment; } - @${scopeClass} @Provides ${viewClass} provides${viewClass}() { return new ${viewClass}(); } - @${scopeClass} @Provides public ${modelClass} provides${modelClass}() { return new ${modelClass}(); } - @${scopeClass} @Provides ${presenterClass} provides${presenterClass}(${viewClass} view, ${modelClass} model) { diff --git a/android-studio-plugin/InFullMvpFragmentJava/root/src/mvp_folder/di/Scope.java.ftl b/android-studio-plugin/InFullMvpFragmentJava/root/src/mvp_folder/di/Scope.java.ftl deleted file mode 100644 index 65aa904..0000000 --- a/android-studio-plugin/InFullMvpFragmentJava/root/src/mvp_folder/di/Scope.java.ftl +++ /dev/null @@ -1,11 +0,0 @@ -package ${relativePackage}.di; - -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; - -import javax.inject.Scope; - -@Retention(RetentionPolicy.RUNTIME) -@Scope -public @interface ${scopeClass} { -} diff --git a/android-studio-plugin/InFullMvpFragmentJava_dagger2.11+/globals.xml.ftl b/android-studio-plugin/InFullMvpFragmentJava_dagger2.11+/globals.xml.ftl index 0043890..e60f89f 100644 --- a/android-studio-plugin/InFullMvpFragmentJava_dagger2.11+/globals.xml.ftl +++ b/android-studio-plugin/InFullMvpFragmentJava_dagger2.11+/globals.xml.ftl @@ -3,7 +3,6 @@ - diff --git a/android-studio-plugin/InFullMvpFragmentJava_dagger2.11+/recipe.xml.ftl b/android-studio-plugin/InFullMvpFragmentJava_dagger2.11+/recipe.xml.ftl index a960513..bef5baf 100644 --- a/android-studio-plugin/InFullMvpFragmentJava_dagger2.11+/recipe.xml.ftl +++ b/android-studio-plugin/InFullMvpFragmentJava_dagger2.11+/recipe.xml.ftl @@ -24,9 +24,6 @@ - - diff --git a/android-studio-plugin/InFullMvpFragmentJava_dagger2.11+/root/src/mvp_folder/di/Component.java.ftl b/android-studio-plugin/InFullMvpFragmentJava_dagger2.11+/root/src/mvp_folder/di/Component.java.ftl index 16978bf..37be2c9 100644 --- a/android-studio-plugin/InFullMvpFragmentJava_dagger2.11+/root/src/mvp_folder/di/Component.java.ftl +++ b/android-studio-plugin/InFullMvpFragmentJava_dagger2.11+/root/src/mvp_folder/di/Component.java.ftl @@ -1,11 +1,9 @@ package ${relativePackage}.di; import ${relativePackage}.${fragmentClass}; -import ${relativePackage}.di.${scopeClass}; import dagger.Subcomponent; import dagger.android.AndroidInjector; -@${scopeClass} @Subcomponent public interface ${componentClass} { diff --git a/android-studio-plugin/InFullMvpFragmentJava_dagger2.11+/root/src/mvp_folder/di/Module.java.ftl b/android-studio-plugin/InFullMvpFragmentJava_dagger2.11+/root/src/mvp_folder/di/Module.java.ftl index bb11415..ee22101 100644 --- a/android-studio-plugin/InFullMvpFragmentJava_dagger2.11+/root/src/mvp_folder/di/Module.java.ftl +++ b/android-studio-plugin/InFullMvpFragmentJava_dagger2.11+/root/src/mvp_folder/di/Module.java.ftl @@ -14,29 +14,24 @@ public abstract class ${moduleClass} { private ${fragmentClass} fragment; - @${scopeClass} @Binds abstract ${moduleClass} bindsFragment(${fragmentClass} fragment); - @${scopeClass} @Provides static Context providesContext(${fragmentClass} fragment) { return fragment.getContext(); } - @${scopeClass} @Provides static ${viewClass} provides${viewClass}() { return new ${viewClass}(); } - @${scopeClass} @Provides public static ${modelClass} provides${modelClass}() { return new ${modelClass}(); } - @${scopeClass} @Provides static ${presenterClass} provides${presenterClass}( ${viewClass} view, diff --git a/android-studio-plugin/InFullMvpFragmentJava_dagger2.11+/root/src/mvp_folder/di/Scope.java.ftl b/android-studio-plugin/InFullMvpFragmentJava_dagger2.11+/root/src/mvp_folder/di/Scope.java.ftl deleted file mode 100644 index 65aa904..0000000 --- a/android-studio-plugin/InFullMvpFragmentJava_dagger2.11+/root/src/mvp_folder/di/Scope.java.ftl +++ /dev/null @@ -1,11 +0,0 @@ -package ${relativePackage}.di; - -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; - -import javax.inject.Scope; - -@Retention(RetentionPolicy.RUNTIME) -@Scope -public @interface ${scopeClass} { -} diff --git a/android-studio-plugin/InFullMvpFragmentJava_dagger2.11+/template.xml b/android-studio-plugin/InFullMvpFragmentJava_dagger2.11+/template.xml index 0eb127a..2aecf50 100644 --- a/android-studio-plugin/InFullMvpFragmentJava_dagger2.11+/template.xml +++ b/android-studio-plugin/InFullMvpFragmentJava_dagger2.11+/template.xml @@ -40,20 +40,12 @@ suggest="${applicationPackage}" help="Path to .R of this app/module" /> - - diff --git a/android-studio-plugin/InFullMvpFragmentKotlin/globals.xml.ftl b/android-studio-plugin/InFullMvpFragmentKotlin/globals.xml.ftl index 4261603..9984702 100644 --- a/android-studio-plugin/InFullMvpFragmentKotlin/globals.xml.ftl +++ b/android-studio-plugin/InFullMvpFragmentKotlin/globals.xml.ftl @@ -4,7 +4,6 @@ - diff --git a/android-studio-plugin/InFullMvpFragmentKotlin/recipe.xml.ftl b/android-studio-plugin/InFullMvpFragmentKotlin/recipe.xml.ftl index 0bded4e..de1e6a5 100644 --- a/android-studio-plugin/InFullMvpFragmentKotlin/recipe.xml.ftl +++ b/android-studio-plugin/InFullMvpFragmentKotlin/recipe.xml.ftl @@ -24,9 +24,6 @@ - - diff --git a/android-studio-plugin/InFullMvpFragmentKotlin/root/src/mvp_folder/di/Graph.java.ftl b/android-studio-plugin/InFullMvpFragmentKotlin/root/src/mvp_folder/di/Graph.java.ftl index c0f042f..67ae4da 100644 --- a/android-studio-plugin/InFullMvpFragmentKotlin/root/src/mvp_folder/di/Graph.java.ftl +++ b/android-studio-plugin/InFullMvpFragmentKotlin/root/src/mvp_folder/di/Graph.java.ftl @@ -32,7 +32,6 @@ public class ${graphClass} { builder.${moduleClass?uncap_first}(module); } - @${scopeClass} @Component( <#if useApplicationComponent> dependencies = ApplicationComponent.class, diff --git a/android-studio-plugin/InFullMvpFragmentKotlin/root/src/mvp_folder/di/Module.java.ftl b/android-studio-plugin/InFullMvpFragmentKotlin/root/src/mvp_folder/di/Module.java.ftl index 2acbfab..1f112db 100644 --- a/android-studio-plugin/InFullMvpFragmentKotlin/root/src/mvp_folder/di/Module.java.ftl +++ b/android-studio-plugin/InFullMvpFragmentKotlin/root/src/mvp_folder/di/Module.java.ftl @@ -19,19 +19,16 @@ public class ${moduleClass} { this.fragment = fragment; } - @${scopeClass} @Provides ${viewClass} provides${viewClass}() { return new ${viewClass}(); } - @${scopeClass} @Provides public ${modelClass} provides${modelClass}() { return new ${modelClass}(); } - @${scopeClass} @Provides ${presenterClass} provides${presenterClass}(${modelClass} model, ${viewClass} view) { diff --git a/android-studio-plugin/InFullMvpFragmentKotlin/root/src/mvp_folder/di/Scope.java.ftl b/android-studio-plugin/InFullMvpFragmentKotlin/root/src/mvp_folder/di/Scope.java.ftl deleted file mode 100644 index 65aa904..0000000 --- a/android-studio-plugin/InFullMvpFragmentKotlin/root/src/mvp_folder/di/Scope.java.ftl +++ /dev/null @@ -1,11 +0,0 @@ -package ${relativePackage}.di; - -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; - -import javax.inject.Scope; - -@Retention(RetentionPolicy.RUNTIME) -@Scope -public @interface ${scopeClass} { -} diff --git a/android-studio-plugin/InFullMvpFragmentKotlin_dagger2.11+/globals.xml.ftl b/android-studio-plugin/InFullMvpFragmentKotlin_dagger2.11+/globals.xml.ftl index 4261603..9984702 100644 --- a/android-studio-plugin/InFullMvpFragmentKotlin_dagger2.11+/globals.xml.ftl +++ b/android-studio-plugin/InFullMvpFragmentKotlin_dagger2.11+/globals.xml.ftl @@ -4,7 +4,6 @@ - diff --git a/android-studio-plugin/InFullMvpFragmentKotlin_dagger2.11+/recipe.xml.ftl b/android-studio-plugin/InFullMvpFragmentKotlin_dagger2.11+/recipe.xml.ftl index bf279d2..77b9bfd 100644 --- a/android-studio-plugin/InFullMvpFragmentKotlin_dagger2.11+/recipe.xml.ftl +++ b/android-studio-plugin/InFullMvpFragmentKotlin_dagger2.11+/recipe.xml.ftl @@ -24,9 +24,6 @@ - - diff --git a/android-studio-plugin/InFullMvpFragmentKotlin_dagger2.11+/root/src/mvp_folder/di/Component.kt.ftl b/android-studio-plugin/InFullMvpFragmentKotlin_dagger2.11+/root/src/mvp_folder/di/Component.kt.ftl index b427225..d608e0a 100644 --- a/android-studio-plugin/InFullMvpFragmentKotlin_dagger2.11+/root/src/mvp_folder/di/Component.kt.ftl +++ b/android-studio-plugin/InFullMvpFragmentKotlin_dagger2.11+/root/src/mvp_folder/di/Component.kt.ftl @@ -4,7 +4,6 @@ import ${relativePackage}.${fragmentClass} import dagger.Subcomponent import dagger.android.AndroidInjector -@${scopeClass} @Subcomponent interface ${componentClass} : AndroidInjector<${fragmentClass}> { diff --git a/android-studio-plugin/InFullMvpFragmentKotlin_dagger2.11+/root/src/mvp_folder/di/Module.java.ftl b/android-studio-plugin/InFullMvpFragmentKotlin_dagger2.11+/root/src/mvp_folder/di/Module.java.ftl index b3accbf..c893765 100644 --- a/android-studio-plugin/InFullMvpFragmentKotlin_dagger2.11+/root/src/mvp_folder/di/Module.java.ftl +++ b/android-studio-plugin/InFullMvpFragmentKotlin_dagger2.11+/root/src/mvp_folder/di/Module.java.ftl @@ -13,25 +13,21 @@ import dagger.Provides; @Module public abstract class ${moduleClass} { - @${scopeClass} @Provides static Context providesContext(${fragmentClass} fragment) { return fragment.getContext(); } - @${scopeClass} @Provides static ${viewClass} provides${viewClass}() { return new ${viewClass}(); } - @${scopeClass} @Provides static ${modelClass} provides${modelClass}() { return new ${modelClass}(); } - @${scopeClass} @Provides static ${presenterClass} provides${ presenterClass}(${modelClass} model, diff --git a/android-studio-plugin/InFullMvpFragmentKotlin_dagger2.11+/root/src/mvp_folder/di/Scope.java.ftl b/android-studio-plugin/InFullMvpFragmentKotlin_dagger2.11+/root/src/mvp_folder/di/Scope.java.ftl deleted file mode 100644 index 65aa904..0000000 --- a/android-studio-plugin/InFullMvpFragmentKotlin_dagger2.11+/root/src/mvp_folder/di/Scope.java.ftl +++ /dev/null @@ -1,11 +0,0 @@ -package ${relativePackage}.di; - -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; - -import javax.inject.Scope; - -@Retention(RetentionPolicy.RUNTIME) -@Scope -public @interface ${scopeClass} { -} diff --git a/android-studio-plugin/InFullMvpFragmentKotlin_dagger2.11+/template.xml b/android-studio-plugin/InFullMvpFragmentKotlin_dagger2.11+/template.xml index c790a72..889a2a1 100644 --- a/android-studio-plugin/InFullMvpFragmentKotlin_dagger2.11+/template.xml +++ b/android-studio-plugin/InFullMvpFragmentKotlin_dagger2.11+/template.xml @@ -40,21 +40,13 @@ suggest="${applicationPackage}" type="string"/> - - + type="string"/> ifmdagger.png diff --git a/android-studio-plugin/InfullAplicationKotlin_dagger2.11+/root/src/mvp_folder/di/ApplicationComponent.kt.ftl b/android-studio-plugin/InfullAplicationKotlin_dagger2.11+/root/src/mvp_folder/di/ApplicationComponent.kt.ftl index 6ece86e..dba1660 100644 --- a/android-studio-plugin/InfullAplicationKotlin_dagger2.11+/root/src/mvp_folder/di/ApplicationComponent.kt.ftl +++ b/android-studio-plugin/InfullAplicationKotlin_dagger2.11+/root/src/mvp_folder/di/ApplicationComponent.kt.ftl @@ -6,7 +6,6 @@ import dagger.Component import dagger.android.support.AndroidSupportInjectionModule import javax.inject.Singleton -@Singleton @Component( modules = arrayOf( AndroidSupportInjectionModule::class, diff --git a/android-studio-plugin/InfullAplicationKotlin_dagger2.11+/root/src/mvp_folder/di/BuildersModule.kt.ftl b/android-studio-plugin/InfullAplicationKotlin_dagger2.11+/root/src/mvp_folder/di/BuildersModule.kt.ftl index 7feef4e..245f410 100644 --- a/android-studio-plugin/InfullAplicationKotlin_dagger2.11+/root/src/mvp_folder/di/BuildersModule.kt.ftl +++ b/android-studio-plugin/InfullAplicationKotlin_dagger2.11+/root/src/mvp_folder/di/BuildersModule.kt.ftl @@ -5,7 +5,6 @@ import dagger.Module @Module abstract class BuildersModule { - // @SomeScope // @ContributesAndroidInjector(modules = arrayOf(SomeModule::class)) - // abstract fun contributesSomeScopeActivityConstructor(): SomeScopeActivity + // abstract fun contributesSomeActivityConstructor(): SomeActivity } \ No newline at end of file diff --git a/android-studio-plugin/InfullAplicationKotlin_dagger2.11+/template.xml b/android-studio-plugin/InfullAplicationKotlin_dagger2.11+/template.xml index a1e15ad..8832ad8 100644 --- a/android-studio-plugin/InfullAplicationKotlin_dagger2.11+/template.xml +++ b/android-studio-plugin/InfullAplicationKotlin_dagger2.11+/template.xml @@ -37,8 +37,7 @@ help="Package where we can find di.ApplicationComponent and di.Components" id="appComponentPackage" suggest="${packageName}.application" - type="string" - visibility="useApplicationComponent"/> + type="string" /> ifmdagger.png