代码拉取完成,页面将自动刷新
buildscript {
ext {
projectVersion = '0.0.8'
// dependencies
boosterVersion = '1.0.0-SNAPSHOT'
thymeleafVersion = '3.0.7.RELEASE'
caffeineVersion = '2.3.5'
junitVersion = '4.12'
}
repositories {
jcenter()
}
it.dependencies {
classpath 'com.github.jengelman.gradle.plugins:shadow:2.0.1'
}
}
plugins {
id "com.gradle.plugin-publish" version "0.9.7"
}
apply plugin: 'groovy'
apply plugin: 'maven-publish'
apply plugin: 'com.github.johnrengelman.plugin-shadow'
tasks.withType(GroovyCompile) {
groovyOptions.encoding = "UTF-8"
options.encoding = "UTF-8"
}
group 'org.jbooster.enumdocs.generator'
version projectVersion
repositories {
maven { url MAVEN_REPO_ALIYUN }
maven { url MAVEN_REPO_JBOOSTER }
jcenter()
mavenCentral()
mavenLocal()
}
dependencies {
shadow gradleApi()
shadow localGroovy()
shadow("org.thymeleaf:thymeleaf:$thymeleafVersion")
shadow("com.github.ben-manes.caffeine:caffeine:$caffeineVersion")
compile("org.jbooster:jbooster-common-core:$boosterVersion")
testCompile("junit:junit:$junitVersion")
}
shadowJar {
outputs.upToDateWhen { false }
classifier = ''
dependencies {
it.exclude(it.dependency("org.thymeleaf:thymeleaf"))
it.exclude(it.dependency("com.github.ben-manes.caffeine:caffeine"))
}
}
jar.dependsOn shadowJar
jar.onlyIf(Specs.SATISFIES_NONE)
configureRelocationShadowJar.onlyIf(Specs.SATISFIES_NONE)
pluginBundle {
website = 'http://git.oschina.net/jbooster/jbooster-enumdocs-gradle-plugin'
vcsUrl = 'http://git.oschina.net/jbooster/jbooster-enumdocs-gradle-plugin'
description = 'jbooster enumdocs generator gradle plugin'
tags = ['enumdocs', 'thymeleaf', 'generator', 'jbooster']
plugins {
enumdocsGeneratorPlugin {
id = 'org.jbooster.enumdocs.generator'
displayName = 'jbooster enumdocs generator gradle plugin'
}
}
mavenCoordinates {
groupId = project.group
artifactId = project.name
}
withDependencies {
it.clear()
project.configurations.shadow.allDependencies.findAll { dep ->
dep.group != null
}.each { dep -> it.add(convert(dep)) }
}
}
publishing {
publications {
plugin(MavenPublication) {
project.shadow.component(it)
artifact sourcesJar
artifact javadocJar
// have to manually change the scope of maven dependencies in the generated pom from runtime to compile
// see https://discuss.gradle.org/t/maven-publish-plugin-generated-pom-making-dependency-scope-runtime/7494
pom.withXml {
asNode().dependencies.'*'.findAll {
it.scope.text() == 'runtime' && project.configurations.shadow.allDependencies.find { dep ->
dep.name == it.artifactId.text()
}
}.each {
it.scope*.value = 'compile'
}
}
}
}
}
task sourcesJar(type: Jar) {
classifier 'sources'
from sourceSets.main.allJava
}
task javadocJar(type: Jar) {
classifier 'javadoc'
from javadoc
}
task wrapper(type: Wrapper) {
gradleVersion = '4.1'
distributionUrl = distributionUrl.replace('https://services.gradle.org/distributions', GRADLE_DISTRIBUTIONS)
}
static def convert(Dependency dep) {
org.apache.maven.model.Dependency dependency = new org.apache.maven.model.Dependency()
dependency.setGroupId(dep.group)
dependency.setArtifactId(dep.name)
dependency.setVersion(dep.version)
dependency.setScope('compile')
dependency
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。