mirror of
https://github.com/apple/pkl.git
synced 2026-06-28 08:16:20 +02:00
Add dummy javadoc to pkl-tools
This commit is contained in:
@@ -7,12 +7,9 @@ plugins {
|
|||||||
signing
|
signing
|
||||||
}
|
}
|
||||||
|
|
||||||
val firstPartySourcesJars by configurations.existing
|
val dummy: SourceSet by sourceSets.creating
|
||||||
|
|
||||||
java {
|
val firstPartySourcesJars by configurations.existing
|
||||||
// create an empty javadoc jar so Maven Central is happy
|
|
||||||
withJavadocJar()
|
|
||||||
}
|
|
||||||
|
|
||||||
// Note: pkl-tools cannot (easily) contain pkl-config-kotlin
|
// Note: pkl-tools cannot (easily) contain pkl-config-kotlin
|
||||||
// because pkl-tools ships with a shaded Kotlin stdlib.
|
// because pkl-tools ships with a shaded Kotlin stdlib.
|
||||||
@@ -37,6 +34,21 @@ dependencies {
|
|||||||
firstPartySourcesJars(project(":pkl-doc", "sourcesJar"))
|
firstPartySourcesJars(project(":pkl-doc", "sourcesJar"))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: need to figure out how to properly generate javadoc here.
|
||||||
|
// For now, we'll include a dummy javadoc jar.
|
||||||
|
val javadocDummy by tasks.creating(Javadoc::class) {
|
||||||
|
source = dummy.allJava
|
||||||
|
}
|
||||||
|
|
||||||
|
java {
|
||||||
|
withJavadocJar()
|
||||||
|
}
|
||||||
|
|
||||||
|
val javadocJar by tasks.existing(Jar::class) {
|
||||||
|
from(javadocDummy.outputs.files)
|
||||||
|
archiveBaseName.set("pkl-tools-all")
|
||||||
|
}
|
||||||
|
|
||||||
tasks.shadowJar {
|
tasks.shadowJar {
|
||||||
archiveBaseName.set("pkl-tools-all")
|
archiveBaseName.set("pkl-tools-all")
|
||||||
}
|
}
|
||||||
@@ -46,6 +58,10 @@ publishing {
|
|||||||
named<MavenPublication>("fatJar") {
|
named<MavenPublication>("fatJar") {
|
||||||
// don't use `-all` suffix because this is the only JAR we publish
|
// don't use `-all` suffix because this is the only JAR we publish
|
||||||
artifactId = "pkl-tools"
|
artifactId = "pkl-tools"
|
||||||
|
// add dummy javadoc jar to publication
|
||||||
|
artifact(javadocJar.flatMap { it.archiveFile }) {
|
||||||
|
classifier = "javadoc"
|
||||||
|
}
|
||||||
pom {
|
pom {
|
||||||
url.set("https://github.com/apple/pkl/tree/main/pkl-tools")
|
url.set("https://github.com/apple/pkl/tree/main/pkl-tools")
|
||||||
description.set("Fat Jar containing pkl-cli, pkl-codegen-java, " +
|
description.set("Fat Jar containing pkl-cli, pkl-codegen-java, " +
|
||||||
|
|||||||
@@ -0,0 +1,24 @@
|
|||||||
|
/**
|
||||||
|
* Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved.
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
*
|
||||||
|
* https://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.
|
||||||
|
*/
|
||||||
|
package org.pkl.tools;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is an intentionally empty class.
|
||||||
|
*/
|
||||||
|
// TODO: figure out how to generate javadoc for a shadow jar.
|
||||||
|
@SuppressWarnings("unused")
|
||||||
|
public class Empty {
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user