Skip to content

Commit 2b9763c

Browse files
committed
[anno] [change dicomponent to dilib, but still use Router for fetch]
1 parent d1ad8ab commit 2b9763c

File tree

16 files changed

+18
-45
lines changed

16 files changed

+18
-45
lines changed

app/build.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ dependencies {
2929

3030
compile project(':jsonlib')
3131

32+
compile project(':dilib')
33+
3234
// annotationProcessor project(':router-anno-compiler')
3335
}
3436

app/src/main/java/com/mrzhang/component/application/AppApplication.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@
22

33
import android.app.Application;
44

5+
import com.ljsw.component.di.serviceimpl.AutowiredServiceImpl;
56
import com.ljsw.component.json.serviceimpl.JsonServiceImpl;
67
import com.mrzhang.component.componentlib.router.Router;
8+
import com.mrzhang.componentservice.di.AutowiredService;
79
import com.mrzhang.componentservice.json.JsonService;
810

911
/**
@@ -21,7 +23,12 @@ public void onCreate() {
2123
// Router.registerComponent("com.mrzhang.share.applike.ShareApplike");
2224

2325
// register jsonService
24-
Router.getInstance().addService(JsonService.class.getSimpleName(), new JsonServiceImpl());
26+
Router.getInstance().addService(JsonService.class.getSimpleName(),
27+
new JsonServiceImpl());
28+
29+
// register DI-AutowiredService
30+
Router.getInstance().addService(AutowiredService.class.getSimpleName(),
31+
new AutowiredServiceImpl());
2532
}
2633

2734

dicomponent/src/main/runalone/AndroidManifest.xml

Lines changed: 0 additions & 13 deletions
This file was deleted.

dicomponent/src/main/runalone/java/com/ljsw/component/di/runalone/application/DIApplication.java

Lines changed: 0 additions & 14 deletions
This file was deleted.

dicomponent/src/main/runalone/res/values/strings.xml

Lines changed: 0 additions & 2 deletions
This file was deleted.
File renamed without changes.
Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,24 @@
1-
apply plugin: 'com.dd.comgradle'
1+
apply plugin: 'com.android.library'
22

33
android {
4-
compileSdkVersion 25
5-
buildToolsVersion "25.0.2"
4+
compileSdkVersion 26
5+
buildToolsVersion "26.0.0"
6+
67
defaultConfig {
78
minSdkVersion 15
8-
targetSdkVersion 14
9+
targetSdkVersion 26
910
versionCode 1
1011
versionName "1.0"
12+
1113
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
12-
}
1314

15+
}
1416
buildTypes {
1517
release {
1618
minifyEnabled false
1719
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
1820
}
19-
debug {
20-
minifyEnabled false
21-
}
2221
}
23-
resourcePrefix "di_"
2422
}
2523

2624
dependencies {
@@ -31,8 +29,3 @@ dependencies {
3129
})
3230
testCompile 'junit:junit:4.12'
3331
}
34-
35-
combuild {
36-
applicatonName = 'com.ljsw.component.di.runalone.application.DIApplication'
37-
isRegisterCompoAuto = true
38-
}

dicomponent/src/androidTest/java/com/ljsw/component/di/ExampleInstrumentedTest.java renamed to dilib/src/androidTest/java/com/ljsw/component/di/ExampleInstrumentedTest.java

File renamed without changes.

0 commit comments

Comments
 (0)