feat: 支持 jitpack 发布

This commit is contained in:
icyleaf
2020-01-14 15:45:23 +08:00
parent 1e10462187
commit 3cb2fec8fb
4 changed files with 30 additions and 7 deletions
+28 -5
View File
@@ -1,6 +1,29 @@
# Zealot Android SDK
## Installation
## 安装
### JitPack
使用 [jitpack](https://jitpack.io) 安装,先需要添加 maven 仓库:
```groovy
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
```
之后在主 app 项目的 `build.gradle` 添加 zealot
```groovy
dependencies {
implementation 'com.github.getzealot:zealot-android:master-SNAPSHOT'
}
```
### JCenter
> 还未发布暂时不可用
@@ -8,9 +31,9 @@
implementation 'im.ews.zealot:zealot:0.1.0'
```
## Usage
## 使用
In your `Application` class add this line to your `onCreate` method:
在你的 `Application` 文件的 `onCreate` 方法添加启动代码:
```kotlin
Zealot.create(this)
@@ -19,9 +42,9 @@ Zealot.create(this)
.launch()
```
## Note
## 注意
You need internet permission:
使用 Zealot SDK 需要开启网络权限
```xml
<uses-permission android:name="android.permission.INTERNET" />
-2
View File
@@ -1,7 +1,5 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
android {
+1
View File
@@ -21,6 +21,7 @@ buildscript {
dependencies {
classpath 'com.android.tools.build:gradle:3.5.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
+1
View File
@@ -1,6 +1,7 @@
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'com.github.dcendents.android-maven'
final String GROUP_ID = "im.ews.zealot"
final String VERSION = "0.1.0"