Skip to content

Commit

Permalink
Add defaultOverrides method
Browse files Browse the repository at this point in the history
  • Loading branch information
jpenilla committed Jan 29, 2024
1 parent 53d71fc commit 58b56a7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ abstract class JavadocLinksExtension {

private fun init() {
filter.convention(DependencyFilter.NoSnapshots())
overrides.putAll(defaultOverrides())
}

fun defaultOverrides(): Map<String, String> {
return mapOf()
}

fun override(dep: ModuleDependency, link: String) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ abstract class JavadocLinksPlugin : Plugin<Project> {
override fun apply(target: Project) {
val ext = target.extensions.create("javadocLinks", JavadocLinksExtension::class)

target.plugins.withId("java") {
target.plugins.withId("java-library") {
target.extensions.getByType(SourceSetContainer::class).configureEach {
if (apiElementsConfigurationName !in target.configurations.names) {
return@configureEach
Expand Down

0 comments on commit 58b56a7

Please sign in to comment.