Skip to content

Commit

Permalink
Merge branch 'release/4.6.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
chrimaeon committed Nov 11, 2022
2 parents 2e57bbf + 135cbdf commit 6e1f411
Show file tree
Hide file tree
Showing 37 changed files with 528 additions and 295 deletions.
2 changes: 2 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ indent_style = space
[*.{kt,kts}]
indent_size = 4
ij_kotlin_imports_layout = *,java.**,javax.**,kotlin.**,^
ij_kotlin_allow_trailing_comma = true
ij_kotlin_allow_trailing_comma_on_call_site = true
3 changes: 1 addition & 2 deletions .github/workflows/create_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,12 @@ jobs:
with:
tag_name: ${{ github.ref }}
body_file: ./RELEASE_NOTES.md
draft: false
publish: true
- name: Notify Slack
uses: chrimaeon/github-slack-action@v1
with:
slack_token: ${{ secrets.SLACK_TOKEN }}
channel: ${{ secrets.SLACK_CHANNEL }}
publish: true
text: "${{ github.ref_name }} on ${{ github.repository }} released! :raised_hands:"
blocks: |
[
Expand Down
48 changes: 28 additions & 20 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Changelog

## [Unreleased]
## Unreleased

### Added

### Changed
Expand All @@ -13,29 +14,30 @@

### Security

## [4.6.0]
### Added
- Dark Mode for HTML report
## 4.6.1

### Changed
- Sort libraries by name or maven coordinated on HTML report
- update AGP version
- update maven model library

### Deprecated
## 4.6.0

### Removed
### Added
- Dark Mode for HTML report

### Fixed
### Changed
- Sort libraries by name or maven coordinated on HTML report

### Security
## 4.5.0

## [4.5.0]
### Added
- Better support for Android Variants

### Changed
- Internal handling of the license mappings

## [4.4.0]
## 4.4.0

### Added
- [SPDX License Identifier](https://spdx.org/licenses/) for various reports

Expand All @@ -45,50 +47,56 @@
### Fixed
- CSV Reporter reports all licenses not only the first one

## [4.3.0]
## 4.3.0

### Changed
- add maven coordinates to Library model
- `version` is not part of the `mavenCoordinates` in the Library model
- Improved Markdown reporter

## [4.2.0]
## 4.2.0

### Added
- XSD Schema for the XML reporter

### Changed
- XML Schema changed
- `<version>` is now attribute to `<library>`
- - `<version>` is now attribute to `<library>`
- `<url>` is now a attribute to `<license>`
- `<library>` has an `id` attribute now

### Fixed
- HTML Reports includes all libraries again

## [4.1.0]
## 4.1.0

### Changed
- Sort dependencies by name and version

## [4.0.0]
## 4.0.0

### Added
- Kotlin Multiplatform support

### Changed
- Extension property to set `enabled` and `destination`

## [3.3.0]
## 3.3.0

### Changed
- Update Android Gradle plugin to version 7+
- Warning when license has no mapping for html reports

## [3.2.0]
## 3.2.0

### Added
- set task outputs to report files
- add DSL to configure reports

### Changed
- use library to create CSV report

## [3.1.0]
## 3.1.0

### Changed
- All public properties are now provided Properties
- Use Kotlin Serialization instead of Moshi
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ This Gradle plugin provides tasks to generate a file with the licenses used from

```kotlin
plugins {
id("com.cmgapps.licenses") version "4.6.0"
id("com.cmgapps.licenses") version "4.6.1"
}
```
</details>
Expand All @@ -28,7 +28,7 @@ plugins {

```groovy
plugins {
id 'com.cmgapps.licenses' version '4.6.0'
id 'com.cmgapps.licenses' version '4.6.1'
}
```
</details>
Expand All @@ -46,7 +46,7 @@ buildscript {
}
}
dependencies {
classpath("com.cmgapps:gradle-licenses-plugin:4.6.0")
classpath("com.cmgapps:gradle-licenses-plugin:4.6.1")
}
}

Expand All @@ -65,7 +65,7 @@ buildscript {
}
}
dependencies {
classpath 'com.cmgapps:gradle-licenses-plugin:4.6.0'
classpath 'com.cmgapps:gradle-licenses-plugin:4.6.1'
}
}
Expand Down
60 changes: 35 additions & 25 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
import com.cmgapps.gradle.logResults
import com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask
import com.github.benmanes.gradle.versions.updates.gradle.GradleReleaseChannel
import kotlinx.kover.api.VerificationValueType.COVERED_LINES_PERCENTAGE
import kotlinx.kover.api.CounterType
import kotlinx.kover.api.DefaultJacocoEngine
import kotlinx.kover.api.KoverTaskExtension
import kotlinx.kover.api.VerificationValueType.COVERED_PERCENTAGE
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import java.util.Date
import java.util.Properties
Expand All @@ -17,12 +20,19 @@ plugins {
`java-gradle-plugin`
`maven-publish`
signing
@Suppress("DSL_SCOPE_VIOLATION")
alias(libs.plugins.kotlin.jvm)
@Suppress("DSL_SCOPE_VIOLATION")
alias(libs.plugins.kotlin.serialization)
@Suppress("DSL_SCOPE_VIOLATION")
alias(libs.plugins.versions)
@Suppress("DSL_SCOPE_VIOLATION")
alias(libs.plugins.gradle.pluginPublish)
@Suppress("DSL_SCOPE_VIOLATION")
alias(libs.plugins.jetbrains.dokka)
@Suppress("DSL_SCOPE_VIOLATION")
alias(libs.plugins.jetbrains.changelog)
@Suppress("DSL_SCOPE_VIOLATION")
alias(libs.plugins.kotlinx.kover)
}

Expand All @@ -46,6 +56,7 @@ idea {
}

java {
withSourcesJar()
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
Expand Down Expand Up @@ -85,11 +96,6 @@ gradlePlugin {
testSourceSets(functionalTestSourceSet)
}

val sourcesJar by tasks.registering(Jar::class) {
archiveClassifier.set("sources")
from(sourceSets.main.get().allSource)
}

val javadocJar by tasks.registering(Jar::class) {
archiveClassifier.set("javadoc")
from(tasks.dokkaJavadoc)
Expand All @@ -98,10 +104,6 @@ val javadocJar by tasks.registering(Jar::class) {
publishing {
publications {
register<MavenPublication>("pluginMaven") {
// component registered by gradle-plugin plugin
artifact(sourcesJar.get())
artifact(javadocJar.get())

val pomArtifactId: String by pomProperties

artifactId = pomArtifactId
Expand Down Expand Up @@ -148,7 +150,9 @@ publishing {
val credentials = Properties().apply {
val credFile = projectDir.resolve("credentials.properties")
if (credFile.exists()) {
load(credFile.inputStream())
credFile.inputStream().use {
load(it)
}
}
}
credentials {
Expand All @@ -165,17 +169,32 @@ signing {

changelog {
version.set(versionName)
header.set(provider { version.get() })
}

kover {
coverageEngine.set(kotlinx.kover.api.CoverageEngine.JACOCO)
engine.set(DefaultJacocoEngine)
verify {
rule {
name = "Minimal Line coverage"
bound {
minValue = 80
counter = CounterType.LINE
valueType = COVERED_PERCENTAGE
}
}
}
}

tasks {
val functionalTest by registering(Test::class) {
group = "verification"
testClassesDirs = functionalTestSourceSet.output.classesDirs
classpath = functionalTestSourceSet.runtimeClasspath

extensions.configure(KoverTaskExtension::class) {
isDisabled.set(true)
}
}

register<JavaExec>("ktlintFormat") {
Expand Down Expand Up @@ -217,8 +236,8 @@ tasks {
"Built-Date" to Date(),
"Built-JDK" to System.getProperty("java.version"),
"Built-Gradle" to gradle.gradleVersion,
"Built-Kotlin" to libs.versions.kotlin
)
"Built-Kotlin" to libs.versions.kotlin,
),
)
}
}
Expand Down Expand Up @@ -253,7 +272,7 @@ tasks {

wrapper {
distributionType = Wrapper.DistributionType.ALL
gradleVersion = "7.4.2"
gradleVersion = libs.versions.gradle.get()
}

val updateReadme by registering {
Expand All @@ -280,16 +299,6 @@ tasks {
patchChangelog {
dependsOn(updateReadme)
}

koverVerify {
rule {
name = "Minimal Line coverage"
bound {
minValue = 80
valueType = COVERED_LINES_PERCENTAGE
}
}
}
}

@Suppress("UnstableApiUsage")
Expand All @@ -313,6 +322,7 @@ dependencies {
testImplementation(libs.hamcrest)
testImplementation(libs.kotlin.reflect)
testImplementation(libs.mockito.kotlin)
testImplementation(libs.android.gradlePlugin)

"functionalTestImplementation"(libs.jUnit) {
exclude(group = "org.hamcrest")
Expand Down
23 changes: 12 additions & 11 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,28 +1,29 @@
[versions]
kotlin = "1.7.0"
kotlin = "1.7.21"
xmlunit = "2.9.0"
gradle = "7.5.1"

[plugins]
kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
versions = "com.github.ben-manes.versions:0.42.0"
gradle-pluginPublish = "com.gradle.plugin-publish:0.21.0"
kotlinx-kover = "org.jetbrains.kotlinx.kover:0.5.1"
jetbrains-dokka = "org.jetbrains.dokka:1.6.21"
jetbrains-changelog = "org.jetbrains.changelog:1.3.1"
versions = "com.github.ben-manes.versions:0.43.0"
gradle-pluginPublish = "com.gradle.plugin-publish:1.1.0"
kotlinx-kover = "org.jetbrains.kotlinx.kover:0.6.1"
jetbrains-dokka = "org.jetbrains.dokka:1.7.20"
jetbrains-changelog = "org.jetbrains.changelog:2.0.0"

[libraries]
android-gradlePlugin = "com.android.tools.build:gradle:7.2.1"
android-gradlePlugin = "com.android.tools.build:gradle:7.3.1"
kotlin-multiplatformPlugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" }
kotlin-serialization = "org.jetbrains.kotlinx:kotlinx-serialization-json:1.3.3"
kotlin-serialization = "org.jetbrains.kotlinx:kotlinx-serialization-json:1.4.1"
kotlin-reflect = { module = "org.jetbrains.kotlin:kotlin-reflect", version.ref = "kotlin" }
kotlin-stdlib-jdk8 = { module = "org.jetbrains.kotlin:kotlin-stdlib-jdk8", version.ref = "kotlin" }
apache-commonsCsv = "org.apache.commons:commons-csv:1.9.0"
maven-model = "org.apache.maven:maven-model:3.8.5"
maven-model = "org.apache.maven:maven-model:3.8.6"
maven-artifact = "org.apache.maven:maven-artifact:3.8.6"
jUnit = "org.junit.jupiter:junit-jupiter:5.8.2"
jUnit = "org.junit.jupiter:junit-jupiter:5.9.1"
hamcrest = "org.hamcrest:hamcrest:2.2"
ktlint = "com.pinterest:ktlint:0.45.2"
ktlint = "com.pinterest:ktlint:0.47.1"
mockito-kotlin = "org.mockito.kotlin:mockito-kotlin:4.0.0"
xmlunit-core = { module = "org.xmlunit:xmlunit-core", version.ref = "xmlunit" }
xmlunit-matchers = { module = "org.xmlunit:xmlunit-matchers", version.ref = "xmlunit" }
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
2 changes: 1 addition & 1 deletion pom.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# SPDX-License-Identifier: Apache-2.0
#
group=com.cmgapps
versionName=4.6.0
versionName=4.6.1
pomName=Gradle Licenses Plugin
pomArtifactId=gradle-licenses-plugin
pomDescription=Gradle plugin that provides a task to generate a license report for the dependencies used in your project Java/Kotlin project.
Expand Down
Loading

0 comments on commit 6e1f411

Please sign in to comment.