Skip to content

Commit

Permalink
optimize demo.
Browse files Browse the repository at this point in the history
  • Loading branch information
yangchengdong committed Jan 22, 2019
1 parent 17d1318 commit b4d6d7e
Show file tree
Hide file tree
Showing 9 changed files with 68 additions and 9 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,3 @@ captures/
# Intellij
*.iml
.idea

micro-module/
2 changes: 2 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@ dependencies {
// implementation 'com.eastwood.common:mis:1.0.0'

implementation misPublication('com.eastwood.demo:library-sdk')
implementation misPublication('com.eastwood.demo:kotlin-sdk')
implementation misPublication('com.eastwood.demo:module-main-sdk')
implementation misPublication('com.eastwood.demo:module-common-sdk')
implementation misPublication('com.eastwood.demo:module-kotlin-sdk')

// after library-sdk push to maven, you need specify a version.
// e.g.
Expand Down
4 changes: 2 additions & 2 deletions library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ apply plugin: 'com.android.library'
apply plugin: 'mis'

android {
compileSdkVersion 25
compileSdkVersion 27

defaultConfig {
minSdkVersion 14
targetSdkVersion 25
targetSdkVersion 27
versionCode 1
versionName "1.0"
}
Expand Down
16 changes: 14 additions & 2 deletions micro-module/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,16 @@ apply plugin: 'micro-module'
apply plugin: 'com.android.library'
apply plugin: 'mis'

apply plugin: 'kotlin-android'

apply plugin: 'kotlin-android-extensions'

android {
compileSdkVersion 25
compileSdkVersion 27

defaultConfig {
minSdkVersion 14
targetSdkVersion 25
targetSdkVersion 27
versionCode 1
versionName "1.0"
}
Expand All @@ -19,9 +23,15 @@ android {
}
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

}

microModule {
include ':p_kotlin'

include ':p_common'

Expand All @@ -30,6 +40,8 @@ microModule {
dependencies {
implementation 'com.eastwood.common:auto-inject:1.0.0'

implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"

implementation project(':mis-core')
// or
// implementation 'com.eastwood.common:mis:1.0.0'
Expand Down
15 changes: 15 additions & 0 deletions micro-module/p_kotlin/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// MicroModule build file where you can add configuration options to publish MicroModule(aar) to Maven
// and declare MicroModule dependencies.

mis {
publications {
p_kotlin {
groupId 'com.eastwood.demo'
artifactId 'module-kotlin-sdk'
}
}
}

dependencies {
implementation fileTree(dir: 'p_kotlin/libs', include: ['*.jar'])
}
6 changes: 6 additions & 0 deletions micro-module/p_kotlin/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.eastwood.demo.micromodule.kotlin">
<application>

</application>
</manifest>
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package com.eastwood.demo.micromodule.kotlin

/**
*
* @author eastwood
* createDate: 2019-01-22
*/
class MicroModuleKotlinService : IMicroModuleKotlin {

override fun test() {

}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package com.eastwood.demo.micromodule.kotlin

/**
*
* @author eastwood
* createDate: 2019-01-22
*/
interface IMicroModuleKotlin {

fun test()

}
6 changes: 3 additions & 3 deletions mis-core/build.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
apply plugin: 'com.android.library'

android {
compileSdkVersion 25
compileSdkVersion 27

defaultConfig {
minSdkVersion 14
targetSdkVersion 25
targetSdkVersion 27
versionCode 1
versionName '1.0.1'
}
Expand All @@ -19,7 +19,7 @@ android {
}

dependencies {
implementation 'com.android.support:appcompat-v7:25.1.1'
implementation 'com.android.support:appcompat-v7:27.1.1'
}


Expand Down

0 comments on commit b4d6d7e

Please sign in to comment.