Skip to content

Commit

Permalink
Merge pull request #13 from jmatsu/setup_ci
Browse files Browse the repository at this point in the history
Fixed github action and remove bintray from plugin project
  • Loading branch information
jmatsu authored Apr 5, 2020
2 parents 86a3dd0 + 3dbce03 commit b4e71fb
Show file tree
Hide file tree
Showing 16 changed files with 140 additions and 167 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: "[[ refs/tags/$(cat VERSION) == $GITHUB_REF ]]"
- uses: actions/setup-java@v1
with:
java-version: '8.0.x'
Expand All @@ -25,6 +26,12 @@ jobs:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
- name: Publish plugin
run: ./gradlew publishPlugins
run: ./gradlew publishPlugins -Dgradle.publish.key=$GRADLE_PORTAL_PUBLISH_KEY -Dgradle.publish.secret=$GRADLE_PORTAL_PUBLISH_SECRET
env:
GRADLE_PORTAL_PUBLISH_KEY: ${{ secrets.GRADLE_PORTAL_PUBLISH_KEY }}
GRADLE_PORTAL_PUBLISH_SECRET: ${{ secrets.GRADLE_PORTAL_PUBLISH_SECRET }}
- name: Publish schema
run: ./gradlew :license-list-schema:bintrayUpload -PdryRun=false
env:
BINTRAY_USER: ${{ secrets.BINTRAY_USER }}
BINTRAY_API_KEY: ${{ secrets.BINTRAY_API_KEY }}
37 changes: 29 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@ License List Plugin is a Gradle plugin to manage artifacts' licenses that your A
4. [Extension](#extension)
5. [Tips](#tips)
1. [license-tools-plugin migration](#for-license-tools-plugin-users)
2. [Add other configurations like WearApp](#additional-configurations-like-wearapp)
3. [Custom variant-aware configurations](#custom-variant-aware-configurations)
4. [Html template customization](#html-customization)
2. [Exclude specific groups/artifacts](#exclude-specific-groupsartifacts)
3. [Add other configurations like WearApp](#additional-configurations-like-wearapp)
4. [Custom variant-aware configurations](#custom-variant-aware-configurations)
5. [Html template customization](#html-customization)
6. [Render Json output](#render-json)
6. [Known limitation](#limitations)
7. [LICENSE](#license)

Expand Down Expand Up @@ -65,7 +67,7 @@ Apply the plugin to "com.android.application" modules.
```kotlin
plugins {
id("com.android.application")
id("license-list") version ("<version}>")
id("io.github.jmatsu.license-list") version ("<version}>")
}
```

Expand All @@ -78,7 +80,7 @@ Other setup is in the following fold.
```groovy
plugins {
id "com.android.application"
id "license-list" version "<version}>"
id "io.github.jmatsu.license-list" version "<version}>"
}
```

Expand All @@ -88,14 +90,14 @@ plugins {

```kotlin
// after applying "com.android.application"
apply(plugin = "license-list")
apply(plugin = "io.github.jmatsu.license-list")
```

**Groovy**

```groovy
// after applying "com.android.application"
apply id: "license-list"
apply id: "io.github.jmatsu.license-list"
```

</details>
Expand Down Expand Up @@ -216,7 +218,7 @@ Those who are from license-tools-plugin can migrate their yml file to the format
```kotlin
plugins {
id("com.cookpad.android.licensetools") // A migration task is available only when the plugin is applied
id("license-list")
id("io.github.jmatsu.license-list")
}

licenseTools {
Expand Down Expand Up @@ -245,6 +247,21 @@ Please move them to the directory where you would like to use for the management
- Only v1.7.0 is tested. Please feel free to open issues if you have any problems.
- `licenseTools.ignoreProjects` is not supported. Because I couldn't imagine the usecase that we really want to ignore *projects*. The group/artifact ignore feature is enough.

#### Exclude specific groups/artifacts

You can exclude specific groups and/or artifacts through `.artifactignore` file. `.artifactignore` file is a list of Regexp that matches with `<group>:<name>`.

Let's say you want to exclude `com.example` group and `io.github.jmatsu:example` artifact. Your ignore file should be like the following.

```
com.example:.*
io.github.jmatsu:example
```

Please note that this plugin will automatically add `^` and `$` to each lines, so you must not add it in this ignore file.

For the more details, see [example/app/.artifactignore](example/app/.artifactignore).

#### Additional configurations like WearApp

For example `wearApp` is an independent from `implementation` etc. This plugin allows you to add such independent configurations to discovery targets. (No action is required if the variant's configurations extend the custom configurations.)
Expand Down Expand Up @@ -280,6 +297,10 @@ visualization {

Please check the original `ftl` file for variables that you can use.

#### Render Json

The schema of json objects are defined in `schema` module published to jcetner. You can chose any serialization method, custom attribute transformation, and so on.

## Limitations

- Only for Android application projects.
Expand Down
2 changes: 1 addition & 1 deletion buildSrc/src/main/java/shared/Definition.kt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package shared

object Definition {
const val pluginId = "license-list"
const val pluginId = "io.github.jmatsu.license-list"
const val group = "io.github.jmatsu"

const val pluginName = "license-list-gradle"
Expand Down
4 changes: 2 additions & 2 deletions example/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ plugins {
id("com.android.application")
kotlin("android")
kotlin("kapt")
id("license-list")
id("io.github.jmatsu.license-list")
}

android {
Expand Down Expand Up @@ -72,7 +72,7 @@ dependencies {
kapt("com.squareup.moshi:moshi-kotlin-codegen:1.9.2")

// sampleConfiguration is included by `implementation` so this plugin will collect sampleConfiguration as well without any setup
sampleConfiguration("io.github.jmatsu:license-list-schema:+")
sampleConfiguration("io.github.jmatsu:license-list-schema:0.1")
// orphanConfiguration is not included by any other configurations, so you need to add this to targetConfigurations. See licenseList block.
orphanConfiguration("com.android.support.test:runner:1.0.2")

Expand Down
Loading

0 comments on commit b4e71fb

Please sign in to comment.