Add standard SPDX license in library's build.gradle file
vlh-ioki opened this issue Β· 0 comments
Hello compose-pay-button-devs π
We don't use directly your library, but stripe does from 20.37.2 version π
in our company we just added licensee to our code base to make sure we are only using dependencies with licenses we once agreed on.
How it worksπ
Behind the scenes, the plugin scan the POM file and check the license name.
The plugin allow only license names and urls that are part of the SPDX Specification.
For whatever reasons, we can't add any arbitrary license names to it, without adding the license URL.
Because compose-pay-button
uses the default Apache 2.0
License without any modification I believe it makes sense to align this and use the SPDX Identifier and url to this license.
If you use this, the plugin will not fail anymore. Because it detects the official SPDX Identifier and is there "sure" that this is a valid license.
Honestly, I'm not sure you want this change. π
So feel free to close it and just go without this information at all.
On the other hand, why not stick to an official specification? Shouldn't hurt anyway, right? π€·
As an example I just modified your build.gradle
file π
All related information you can find here: https://docs.gradle.org/current/userguide/publishing_maven.html
plugins {
....
id 'maven-publish'
}
.....
publishing {
publications {
javaLibrary(MavenPublication) {
plugins.withId("java") {
from components.java
artifact tasks.named("sourcesJar")
// artifact tasks.named("javadocJar")
}
artifactId = project.base.archivesName.get()
pom {
name = artifactId
afterEvaluate {
description = project.description
}
plugins.withId("java") {
packaging = project.tasks.jar.archiveExtension.get()
}
url = "https://github.com/google-pay/compose-pay-button"
licenses {
license {
name = 'Apache-2.0'
url = 'https://opensource.org/license/apache-2-0'
distribution = 'repo'
}
}
developers {
}
scm {
url = 'https://github.com/google-pay/compose-pay-button'
}
}
}
}
repositories { maven { url = layout.buildDirectory.dir("repo") } }
}
.....
Thank you in advance π