Skip to content

Commit db3f2d4

Browse files
author
yangchengdong
committed
release v2.0.0
1 parent 1c37f69 commit db3f2d4

File tree

4 files changed

+31
-18
lines changed

4 files changed

+31
-18
lines changed

README.md

+25-15
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,30 @@ MIS主要解决的问题是如何在一个模块内维护其对外暴露的接
1414
buildscript {
1515
dependencies {
1616
...
17-
classpath 'com.eastwood.tools.plugins:mis:1.5.1'
17+
classpath 'com.eastwood.tools.plugins:mis:2.0.0'
1818
}
1919
}
2020
```
2121

22-
在模块的build.gradle中添加**mis插件**
22+
在根项目的build.gradle中添加mis插件的**相关配置**
2323
```
2424
...
25-
// 需位于android和kotlin相关插件之后
25+
2626
apply plugin: 'mis'
27+
28+
mis {
29+
30+
compileSdkVersion 27
31+
32+
compileOptions {
33+
sourceCompatibility JavaVersion.VERSION_1_8
34+
targetCompatibility JavaVersion.VERSION_1_8
35+
}
36+
37+
}
2738
```
39+
* compileSdkVersion 同 android { compileSdkVersion ... }
40+
* compileOptions 同 android { compileOptions { ... } }
2841

2942
#### 创建 mis 目录
3043

@@ -38,7 +51,9 @@ apply plugin: 'mis'
3851

3952
<img src='https://github.com/EastWoodYang/Mis/blob/master/picture/1.png'/>
4053

41-
#### 配置mis相对应的publication
54+
#### 在模块目录内,创建单独的mis.gradle文件, 并在内声明mis对应的publication
55+
56+
mis.gradle:
4257
```
4358
mis {
4459
publications {
@@ -62,17 +77,13 @@ mis {
6277

6378
*`dependencies`中可声明该mis Publication编译和运行时需用到的第三方库,仅支持`compileOnly``implementation`。如果mis文件夹下的类使用了kotlin语法,需要添加kotlin相关的依赖,比如'org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version'。
6479

65-
#### 发布至Maven
80+
#### 发布mis publication 至 Maven
81+
在根项目的build.gradle中添加mis插件的**repositories配置**
6682
```
6783
mis {
68-
publications {
69-
main {
70-
groupId 'com.eastwood.demo'
71-
artifactId 'library-sdk'
72-
version '1.0.0-SNAPSHOT'
73-
...
74-
}
75-
}
84+
85+
compileSdkVersion 27
86+
...
7687
7788
repositories {
7889
maven {
@@ -86,9 +97,8 @@ mis {
8697
...
8798
}
8899
```
89-
* 发布时需设置`version`
90100

91-
* 发布时内部用到的插件是`maven-publish`,其中`repositories`相关设置请查阅[# Maven Publish Plugin](https://docs.gradle.org/current/userguide/publishing_maven.html#publishing_maven:repositories)
101+
* 发布用到的插件是`maven-publish`,其中`repositories`相关设置请查阅[# Maven Publish Plugin](https://docs.gradle.org/current/userguide/publishing_maven.html#publishing_maven:repositories)
92102

93103
**Gradle Sync**后,打开Gradle Tasks View,选择**publishMis[...]PublicationToMavenRepository**执行发布任务。
94104

build.gradle

+4-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@ buildscript {
1717
classpath 'com.eastwood.tools.plugins:auto-inject:1.0.3'
1818

1919
// mis
20-
classpath 'com.eastwood.tools.plugins:mis-plugin'
20+
classpath 'com.eastwood.tools.plugins:mis:2.0.0'
21+
22+
// mis for dev
23+
// classpath 'com.eastwood.tools.plugins:mis-plugin'
2124

2225
}
2326
}

mis-plugin/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ apply plugin: 'maven'
1818

1919
def groupId = 'com.eastwood.tools.plugins'
2020
def artifactId = 'mis'
21-
def version = '1.5.1'
21+
def version = '2.0.0'
2222

2323
def localReleaseDest = "${buildDir}/release/${version}"
2424

settings.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
includeBuild './mis-plugin'
1+
//includeBuild './mis-plugin'
22
include ':mis-core'
33

44
include ':app', ':library', ':micro-module', ':kotlin'

0 commit comments

Comments
 (0)