File tree 4 files changed +23
-3
lines changed
src/main/java/com/luojilab/reader
4 files changed +23
-3
lines changed Original file line number Diff line number Diff line change 1
1
// Top-level build file where you can add configuration options common to all sub-projects/modules.
2
2
3
3
buildscript {
4
- ext. kotlin_version = ' 1.1.3-2 '
4
+ ext. kotlin_version = ' 1.2.21 '
5
5
repositories {
6
6
jcenter()
7
7
maven { url " https://jitpack.io" }
Original file line number Diff line number Diff line change 1
1
apply plugin : ' com.dd.comgradle'
2
+ apply plugin : ' kotlin-android'
2
3
3
4
android {
4
5
compileSdkVersion 26
@@ -43,9 +44,13 @@ dependencies {
43
44
exclude group : ' com.android.support' , module : ' support-annotations'
44
45
})
45
46
testCompile ' junit:junit:4.12'
47
+ compile " org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version "
46
48
}
47
49
48
50
combuild {
49
51
applicationName = ' com.luojilab.reader.runalone.application.ReaderApplication'
50
52
isRegisterCompoAuto = false
53
+ }
54
+ repositories {
55
+ mavenCentral()
51
56
}
Original file line number Diff line number Diff line change 4
4
import com .luojilab .component .componentlib .router .Router ;
5
5
import com .luojilab .component .componentlib .router .ui .UIRouter ;
6
6
import com .luojilab .componentservice .readerbook .ReadBookService ;
7
- import com .luojilab .reader .serviceimpl .ReadBookServiceImpl ;
7
+ import com .luojilab .reader .serviceimpl .ReadBookServiceImplKotlin ;
8
8
9
9
/**
10
10
* Created by mrzhang on 2017/6/15.
@@ -18,7 +18,8 @@ public class ReaderAppLike implements IApplicationLike {
18
18
@ Override
19
19
public void onCreate () {
20
20
uiRouter .registerUI ("reader" );
21
- router .addService (ReadBookService .class .getSimpleName (), new ReadBookServiceImpl ());
21
+ // router.addService(ReadBookService.class.getSimpleName(), new ReadBookServiceImpl());
22
+ router .addService (ReadBookService .class .getSimpleName (), new ReadBookServiceImplKotlin ());
22
23
}
23
24
24
25
@ Override
Original file line number Diff line number Diff line change
1
+ package com.luojilab.reader.serviceimpl
2
+
3
+ import android.support.v4.app.Fragment
4
+ import com.luojilab.componentservice.readerbook.ReadBookService
5
+ import com.luojilab.reader.ReaderFragment
6
+
7
+ /* *
8
+ * Created by mrzhang on 2018/2/9.
9
+ */
10
+ class ReadBookServiceImplKotlin : ReadBookService {
11
+ override fun getReadBookFragment (): Fragment {
12
+ return ReaderFragment ()
13
+ }
14
+ }
You can’t perform that action at this time.
0 commit comments