File tree Expand file tree Collapse file tree 4 files changed +23
-3
lines changed
src/main/java/com/luojilab/reader Expand file tree Collapse file tree 4 files changed +23
-3
lines changed Original file line number Diff line number Diff line change 11// Top-level build file where you can add configuration options common to all sub-projects/modules.
22
33buildscript {
4- ext. kotlin_version = ' 1.1.3-2 '
4+ ext. kotlin_version = ' 1.2.21 '
55 repositories {
66 jcenter()
77 maven { url " https://jitpack.io" }
Original file line number Diff line number Diff line change 11apply plugin : ' com.dd.comgradle'
2+ apply plugin : ' kotlin-android'
23
34android {
45 compileSdkVersion 26
@@ -43,9 +44,13 @@ dependencies {
4344 exclude group : ' com.android.support' , module : ' support-annotations'
4445 })
4546 testCompile ' junit:junit:4.12'
47+ compile " org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version "
4648}
4749
4850combuild {
4951 applicationName = ' com.luojilab.reader.runalone.application.ReaderApplication'
5052 isRegisterCompoAuto = false
53+ }
54+ repositories {
55+ mavenCentral()
5156}
Original file line number Diff line number Diff line change 44import com .luojilab .component .componentlib .router .Router ;
55import com .luojilab .component .componentlib .router .ui .UIRouter ;
66import com .luojilab .componentservice .readerbook .ReadBookService ;
7- import com .luojilab .reader .serviceimpl .ReadBookServiceImpl ;
7+ import com .luojilab .reader .serviceimpl .ReadBookServiceImplKotlin ;
88
99/**
1010 * Created by mrzhang on 2017/6/15.
@@ -18,7 +18,8 @@ public class ReaderAppLike implements IApplicationLike {
1818 @ Override
1919 public void onCreate () {
2020 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 ());
2223 }
2324
2425 @ 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