In Gradle kts, how to download source and javadoc through a gradle command? - Stack Overflow

admin2025-04-17  3

I need to download javadoc & source from the following location:

.13/4.0.7/

How to do it in gradle, or any of its plugin? The following kts script does nothing:


allprojects {

    apply(plugin = "java")
    apply(plugin = "java-library")
    apply(plugin = "java-test-fixtures")

    apply(plugin = "project-report")
    apply(plugin = "idea")
    apply(plugin = "eclipse")

    group = vs.rootGroupID
    version = vs.rootV

    repositories {
        mavenLocal()
        mavenCentral()

//        jcenter()
        maven(";)

        // for Scala formless
        maven {
            name = "bondlink-maven-repo"
            url = uri(";)
        }
    }


    java {

        val jvmTarget = vs.jvmTarget

        withSourcesJar()
        withJavadocJar()

        sourceCompatibility = jvmTarget
        targetCompatibility = jvmTarget
    }

    eclipse {

        classpath {

            isDownloadJavadoc = true
            isDownloadSources = true
        }
    }


    idea {

        targetVersion = "2023"


        module {

            isDownloadJavadoc = true
            isDownloadSources = true
        }
    }

}

转载请注明原文地址:http://anycun.com/QandA/1744887544a89033.html