spring源码构建

注释掉dokka和asciidoctor

task schemaZip(type: Zip) {
    group = "Distribution"
    baseName = "spring-framework"
    classifier = "schema"
    description = "Builds -${classifier} archive containing all " +
            "XSDs for deployment at http://springframework.org/schema."
    duplicatesStrategy 'exclude'
    moduleProjects.each { subproject ->
        def Properties schemas = new Properties();

        subproject.sourceSets.main.resources.find {
            it.path.endsWith("META-INF\\spring.schemas")
        }?.withInputStream { schemas.load(it) }

        for (def key : schemas.keySet()) {
            def shortName = key.replaceAll(/http.*schema.(.*).spring-.*/, '$1')
            assert shortName != key
            File xsdFile = subproject.sourceSets.main.resources.find {
                it.path.endsWith(schemas.get(key).replaceAll('\\/','\\\\'))
            }
            assert xsdFile != null
            into (shortName) {
                from xsdFile.path
            }
        }
    }
}


修改 spring-beans下面的 spring-bearns:gradle文件的最后三行为
def deps = compileGroovy.taskDependencies.immutableValues + compileGroovy.taskDependencies.mutableValues
compileGroovy.dependsOn = deps - "compileJava"
compileKotlin.dependsOn(compileGroovy)
compileKotlin.classpath += files(compileGroovy.destinationDir)

https://www.jianshu.com/p/9a623bdc5c51

你可能感兴趣的:(spring源码构建)