Skip to content

Commit

Permalink
Merge branch 'master' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
2BAB authored Dec 26, 2023
2 parents c2728cc + 5a2c6ef commit ba9ffac
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 10 deletions.
27 changes: 22 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,29 @@ Functionality that Seal provided is more like the **first aid** to **save an urg

## Quick Start

1. Compile Seal plugin:
**0x01. Add the plugin to classpath:**

``` kotlin
// root project's build.gradle.kts
// Option 1.
// Add `mavenCentral` to `pluginManagement{}` on `settings.gradle.kts` (or the root `build.gradle.kts`),
// and then the seal plugin id.
pluginManagement {
repositories {
...
mavenCentral()
}
plugins {
...
id("me.2bab.seal") version "3.3.0" apply false
}
}

// Option 2.
// Using classic `buildscript{}` block in root build.gradle.kts.
buildscript {
repositories {
...
mavenCentral()
google()
}
dependencies {
classpath("com.android.tools.build:gradle:8.1.2")
Expand All @@ -29,9 +44,10 @@ buildscript {
}
```

2. Apply plugin:
**0x02. Apply the plugin:**

``` Kotlin
// On Application's build.gradle.kts (do not use in Library project)
plugins {
id("com.android.application")
kotlin("android")
Expand All @@ -40,7 +56,7 @@ plugins {
}
```

3. Configurations:
**0x03. Configurations**

``` Kotlin
seal {
Expand Down Expand Up @@ -131,6 +147,7 @@ Polyfill is only supported & tested on latest **2** Minor versions of Android Gr
| 3.0.x | [2.0.0](https://github.com/2BAB/Seal/releases/tag/2.0.0) |
| 2.3.x | [1.1.0](https://github.com/2BAB/Seal/releases/tag/1.1.0) |


## Why Seal use DOM parser API

[Oracle Docs: Comparing StAX to Other JAXP APIs](https://docs.oracle.com/javase/tutorial/jaxp/stax/why.html#bnbea)
Expand Down
27 changes: 22 additions & 5 deletions README_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,30 @@ Seal 是一款处理 AndroidManifest.xml 合并冲突的 Gradle 插件,由[全

## 快速开始

1. 编译Seal插件:
**0x01. 引入插件至当前项目的 classpath:**

``` Kotlin
// 根项目的 build.gradle.kts
``` kotlin
// 可选方式 1.
// 添加 `mavenCentral` 到 `settings.gradle.kts`(或根目录 `build.gradle.kts`) 的 `pluginManagement{}` 内,
// 并且声明 seal 插件的 id.
pluginManagement {
repositories {
...
mavenCentral()
}
plugins {
...
id("me.2bab.seal") version "3.3.0" apply false
}
}


// 可选方式 2.
// 使用经典的 `buildscript{}` 引入方式(在根目录的 build.gradle.kts).
buildscript {
repositories {
...
mavenCentral()
google()
}
dependencies {
classpath("com.android.tools.build:gradle:8.1.2")
Expand All @@ -31,9 +47,10 @@ buildscript {
}
```

2. 使用插件:
2. 应用插件:

``` Kotlin
// 在 Application 模块的 build.gradle.kts (不要在 Library 模块使用)
plugins {
id("com.android.application")
kotlin("android")
Expand Down
1 change: 1 addition & 0 deletions seal/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ gradlePlugin {
create("seal") {
id = "me.2bab.seal"
implementationClass ="me.xx2bab.seal.SealPlugin"
displayName = "me.2bab.seal"
}
}
}
Expand Down

0 comments on commit ba9ffac

Please sign in to comment.