mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2024-11-23 00:13:16 +00:00
DIテスト
This commit is contained in:
parent
7bcc4dbbad
commit
bc0370303f
|
@ -45,18 +45,18 @@ dependencies {
|
||||||
implementation project(':feature:scan')
|
implementation project(':feature:scan')
|
||||||
implementation project(':feature:debug') // デバッグメニュー
|
implementation project(':feature:debug') // デバッグメニュー
|
||||||
|
|
||||||
// Component
|
// // Component
|
||||||
implementation project(':component:common')
|
// implementation project(':component:common')
|
||||||
implementation project(':component:scanner')
|
// implementation project(':component:scanner')
|
||||||
implementation project(':component:viewer')
|
// implementation project(':component:viewer')
|
||||||
|
|
||||||
// Data
|
// // Data
|
||||||
implementation project(':data:repository')
|
// implementation project(':data:repository')
|
||||||
|
//
|
||||||
// Source
|
// // Source
|
||||||
implementation project(':data:source:database')
|
// implementation project(':data:source:database')
|
||||||
implementation project(':data:source:preference')
|
// implementation project(':data:source:preference')
|
||||||
|
//
|
||||||
// Hilt (DI)
|
// Hilt (DI)
|
||||||
implementation libs.com.google.dagger.hilt.android
|
implementation libs.com.google.dagger.hilt.android
|
||||||
annotationProcessor libs.com.google.dagger.hilt.compiler
|
annotationProcessor libs.com.google.dagger.hilt.compiler
|
||||||
|
|
|
@ -11,7 +11,6 @@ import android.widget.Toast;
|
||||||
|
|
||||||
import com.google.android.material.bottomnavigation.BottomNavigationView;
|
import com.google.android.material.bottomnavigation.BottomNavigationView;
|
||||||
|
|
||||||
import one.nem.lacerta.data.repository.TestData;
|
|
||||||
|
|
||||||
import dagger.hilt.android.AndroidEntryPoint;
|
import dagger.hilt.android.AndroidEntryPoint;
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
@ -19,9 +18,6 @@ import javax.inject.Inject;
|
||||||
@AndroidEntryPoint
|
@AndroidEntryPoint
|
||||||
public class MainActivity extends AppCompatActivity {
|
public class MainActivity extends AppCompatActivity {
|
||||||
|
|
||||||
@Inject
|
|
||||||
TestData testData;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
@ -36,6 +32,6 @@ public class MainActivity extends AppCompatActivity {
|
||||||
|
|
||||||
NavigationUI.setupWithNavController(bottomNavigationView, navController);
|
NavigationUI.setupWithNavController(bottomNavigationView, navController);
|
||||||
|
|
||||||
Toast.makeText(this, testData.getTestData(), Toast.LENGTH_SHORT).show();
|
Toast.makeText(this, "testMessage", Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,5 +1,6 @@
|
||||||
plugins {
|
plugins {
|
||||||
alias(libs.plugins.com.android.library)
|
alias(libs.plugins.com.android.library)
|
||||||
|
id 'com.google.dagger.hilt.android'
|
||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
|
|
|
@ -21,6 +21,7 @@ import javax.inject.Inject;
|
||||||
* create an instance of this fragment.
|
* create an instance of this fragment.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@AndroidEntryPoint
|
||||||
public class DebugMenuFragment extends Fragment {
|
public class DebugMenuFragment extends Fragment {
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
|
|
Loading…
Reference in New Issue
Block a user