Skip to content

Commit

Permalink
Merge branch 'release/4.7.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
chrimaeon committed Jan 26, 2023
2 parents 18b235e + 2baf85d commit dfdffea
Show file tree
Hide file tree
Showing 18 changed files with 278 additions and 37 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@

### Security

## 4.7.0

### Added
- EPL v1.0 License - #15
- Additional URL for LGPL-2.1

## 4.6.1

### Changed
Expand Down
12 changes: 1 addition & 11 deletions NOTICE
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
Copyright (c) 2018. Christian Grach <christian.grach@cmgapps.com>

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
SPDX-License-Identifier: Apache-2.0
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.1"
id("com.cmgapps.licenses") version "4.7.0"
}
```
</details>
Expand All @@ -28,7 +28,7 @@ plugins {

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

Expand All @@ -65,7 +65,7 @@ buildscript {
}
}
dependencies {
classpath 'com.cmgapps:gradle-licenses-plugin:4.6.1'
classpath 'com.cmgapps:gradle-licenses-plugin:4.7.0'
}
}
Expand Down
4 changes: 2 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ val ktlint: Configuration by configurations.creating

idea {
module {
testSourceDirs = testSourceDirs + functionalTestSourceSet.allJava.srcDirs
testResourceDirs = testResourceDirs + functionalTestSourceSet.resources.srcDirs
testSources.from(functionalTestSourceSet.allJava.srcDirs)
testResources.from(functionalTestSourceSet.resources.srcDirs)
}
}

Expand Down
1 change: 1 addition & 0 deletions example/kotlin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,5 @@ tasks.register<Copy>("copyLicense") {

dependencies {
implementation("org.apache.maven:maven-model:3.6.3")
implementation("ch.qos.logback:logback-classic:1.4.5")
}
18 changes: 9 additions & 9 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[versions]
kotlin = "1.7.21"
xmlunit = "2.9.0"
gradle = "7.5.1"
kotlin = "1.8.0"
xmlunit = "2.9.1"
gradle = "7.6"

[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.43.0"
versions = "com.github.ben-manes.versions:0.44.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"
Expand All @@ -19,11 +19,11 @@ 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.6"
maven-artifact = "org.apache.maven:maven-artifact:3.8.6"
jUnit = "org.junit.jupiter:junit-jupiter:5.9.1"
maven-model = "org.apache.maven:maven-model:3.8.7"
maven-artifact = "org.apache.maven:maven-artifact:3.8.7"
jUnit = "org.junit.jupiter:junit-jupiter:5.9.2"
hamcrest = "org.hamcrest:hamcrest:2.2"
ktlint = "com.pinterest:ktlint:0.47.1"
mockito-kotlin = "org.mockito.kotlin:mockito-kotlin:4.0.0"
ktlint = "com.pinterest:ktlint:0.48.2"
mockito-kotlin = "org.mockito.kotlin:mockito-kotlin:4.1.0"
xmlunit-core = { module = "org.xmlunit:xmlunit-core", version.ref = "xmlunit" }
xmlunit-matchers = { module = "org.xmlunit:xmlunit-matchers", version.ref = "xmlunit" }
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
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.5.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
6 changes: 6 additions & 0 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,12 @@ set -- \
org.gradle.wrapper.GradleWrapperMain \
"$@"

# Stop when "xargs" is not available.
if ! command -v xargs >/dev/null 2>&1
then
die "xargs is not available"
fi

# Use "xargs" to parse quoted args.
#
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
Expand Down
14 changes: 8 additions & 6 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
@rem limitations under the License.
@rem

@if "%DEBUG%" == "" @echo off
@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
Expand All @@ -25,7 +25,7 @@
if "%OS%"=="Windows_NT" setlocal

set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
if "%DIRNAME%"=="" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

Expand All @@ -40,7 +40,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome

set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto execute
if %ERRORLEVEL% equ 0 goto execute

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Expand Down Expand Up @@ -75,13 +75,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar

:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
if %ERRORLEVEL% equ 0 goto mainEnd

:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
set EXIT_CODE=%ERRORLEVEL%
if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%

:mainEnd
if "%OS%"=="Windows_NT" endlocal
Expand Down
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.1
versionName=4.7.0
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
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,13 @@ class LicensePluginAndroidShould {
assertThat(
File("$reportFolder/licenseDebugReport/licenses.txt").readText().trim(),
`is`(
"Licenses\n" + "├─ Fake dependency name:1.0.0\n" + "│ ├─ License: Some license\n" + "│ └─ URL: http://website.tld/\n" + "└─ group:noname:1.0.0\n" + " ├─ License: Some license\n" + " └─ URL: http://website.tld/",
"Licenses\n" +
"├─ Fake dependency name:1.0.0\n" +
"│ ├─ License: Some license\n" +
"│ └─ URL: http://website.tld/\n" +
"└─ group:noname:1.0.0\n" +
" ├─ License: Some license\n" +
" └─ URL: http://website.tld/",
),
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class LicensePluginJavaShould {
}

@ParameterizedTest(name = "${ParameterizedTest.DISPLAY_NAME_PLACEHOLDER} - Gradle Version = {0}")
@ValueSource(strings = ["6.8", "6.9", "7.0", "7.1", "7.2", "7.3", "7.4", "7.5"])
@ValueSource(strings = ["6.8", "6.9", "7.0", "7.1", "7.2", "7.3", "7.4", "7.5", "7.6"])
fun `apply Licenses plugin to various Gradle versions`(version: String) {
val result = gradleRunner
.withGradleVersion(version)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ internal val LicenseId.filename: String
LicenseId.LGPL_3 -> "lgpl-3.0.txt"
LicenseId.MIT -> "mit.txt"
LicenseId.MPL_2 -> "mpl-2.0.txt"
LicenseId.EPL_1 -> "epl-1.0.txt"
else -> throw IllegalArgumentException("$this does not have a file associated")
}

Expand Down
2 changes: 2 additions & 0 deletions src/main/kotlin/com/cmgapps/license/model/Models.kt
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ enum class LicenseId(val spdxLicenseIdentifier: String?) {
LGPL_3("LGPL-3.0-only"),
MIT("MIT"),
MPL_2("MPL-2.0"),
EPL_1("EPL-1.0"),
UNKNOWN(null),
;

Expand All @@ -68,6 +69,7 @@ enum class LicenseId(val spdxLicenseIdentifier: String?) {
"LGPL-3.0-only" -> LGPL_3
"MIT" -> MIT
"MPL-2.0" -> MPL_2
"EPL-1.0" -> EPL_1
else -> UNKNOWN
}

Expand Down
13 changes: 13 additions & 0 deletions src/main/resources/license_map.csv
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ http://www.gnu.org/licenses/lgpl-2.1.txt,LGPL_2_1
https://www.gnu.org/licenses/lgpl-2.1.txt,LGPL_2_1
http://opensource.org/licenses/LGPL-2.1,LGPL_2_1
https://opensource.org/licenses/LGPL-2.1,LGPL_2_1
http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html,LGPL_2_1
https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html,LGPL_2_1
LGPL-3.0,LGPL_3
LGPL-3.0-only,LGPL_3
GNU Lesser General Public License v3.0,LGPL_3
Expand All @@ -67,3 +69,14 @@ CDDL-1.0,CDDL
Common Development and Distribution License 1.0,CDDL
http://opensource.org/licenses/cddl1,CDDL
https://opensource.org/licenses/cddl1,CDDL
EPL-1.0,EPL_1
Eclipse Public License - v1.0,EPL_1
Eclipse Public License - v 1.0,EPL_1
http://www.eclipse.org/legal/epl-v10.html,EPL_1
https://www.eclipse.org/legal/epl-v10.html,EPL_1
http://www.eclipse.org/org/documents/epl-1.0/EPL-1.0.txt,EPL_1
https://www.eclipse.org/org/documents/epl-1.0/EPL-1.0.txt,EPL_1
http://opensource.org/licenses/EPL-1.0,EPL_1
https://opensource.org/licenses/EPL-1.0,EPL_1


Loading

0 comments on commit dfdffea

Please sign in to comment.