-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CI][ANDR] Add Gradle plugin to check against non-permitted licenses #5
Changes from 1 commit
8fa9d0c
2630f8b
6479f29
5989902
54f60ff
bbf4c11
c96d7db
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"allowedLicenses": [ | ||
{ | ||
"moduleLicense": "Apache-2.0" | ||
}, | ||
{ | ||
"moduleLicense": "MIT" | ||
}, | ||
{ | ||
"moduleLicense": "ISC License" | ||
}, | ||
{ | ||
"moduleLicense": null, | ||
"moduleVersion": "unspecified", | ||
"moduleName": "capture-sdk:common" | ||
}, | ||
{ | ||
"moduleLicense": null, | ||
"moduleVersion": "unspecified", | ||
"moduleName": "capture-sdk:replay" | ||
} | ||
] | ||
} | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
plugins { | ||
`kotlin-dsl` | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
maven("https://plugins.gradle.org/m2/") | ||
} | ||
|
||
dependencies { | ||
// Pulls in dependencies to be used across shared configurations via files in src/main/kotlin | ||
// using precompiled script convention plugins: https://docs.gradle.org/current/userguide/sharing_build_logic_between_subprojects.html | ||
implementation("com.github.jk1:gradle-license-report:2.9") | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import com.github.jk1.license.filter.SpdxLicenseBundleNormalizer | ||
import com.github.jk1.license.render.JsonReportRenderer | ||
|
||
plugins { | ||
id("com.github.jk1.dependency-license-report") | ||
} | ||
|
||
licenseReport { | ||
configurations = arrayOf("releaseRuntimeClasspath") | ||
allowedLicensesFile = project.rootProject.file("allowed-licenses.json") | ||
renderers = arrayOf(JsonReportRenderer()) | ||
filters = arrayOf(SpdxLicenseBundleNormalizer()) | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ^ here we centralize the plugin logic using gradle's precompiled convention plugins https://docs.gradle.org/current/userguide/custom_plugins.html |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,22 +7,24 @@ plugins { | |
// Publish | ||
alias(libs.plugins.dokka) // Must be applied here for publish plugin. | ||
alias(libs.plugins.maven.publish) | ||
|
||
id("dependency-license-config") | ||
} | ||
|
||
group = "io.bitdrift" | ||
|
||
dependencies { | ||
api(project(":replay")) | ||
api(project(path = ":replay", configuration = "default")) | ||
api(libs.androidx.lifecycle.common) | ||
api(libs.androidx.lifecycle.process) | ||
api(libs.kotlin.result.jvm) | ||
api(libs.okhttp) | ||
|
||
implementation(project(path = ":common", configuration = "default")) | ||
implementation(libs.androidx.core) | ||
implementation(libs.androidx.startup.runtime) | ||
implementation(libs.jsr305) | ||
implementation(libs.gson) | ||
implementation("androidx.tracing:tracing-ktx:1.2.0") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. unrelated clean-up |
||
|
||
testImplementation(libs.junit) | ||
testImplementation(libs.assertj.core) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
^ this is the list of allowed licenses