1 Star 0 Fork 65

极速代码/codgen

forked from 黄天政/codgen 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
build.gradle 1.62 KB
一键复制 编辑 原始数据 按行查看 历史
group 'com.bcs.codgen'
version '1.0.6'
/*自带插件*/
apply plugin: 'java'
sourceCompatibility = 1.6
/*UTF-8 很重要*/
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
options.warnings = false
}
tasks.withType(org.gradle.api.tasks.javadoc.Javadoc) {
options.encoding = 'UTF-8'
}
javadoc {
options.charSet = 'UTF-8'
}
compileJava {
options.compilerArgs << '-XDignore.symbol.file'
options.fork = true
println("$System.env.USER")
println("detected JAVA_HOME=$System.env.JAVA_HOME")
println("setting options.bootClasspath = $System.env.JAVA_HOME/jre/lib/rt.jar")
options.bootClasspath = "$System.env.JAVA_HOME/jre/lib/rt.jar"
}
repositories {
mavenCentral()
}
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.11'
compile ('commons-lang:commons-lang:2.6')
compile ('commons-logging:commons-logging:1.2')
compile ('log4j:log4j:1.2.17')
compile ("org.freemarker:freemarker:2.3.20")
}
//依赖编译,然后打包JAR
task taskJar(type:Jar, dependsOn: compileJava) {
from 'build/classes/main'
destinationDir = file('dist')
manifest {
attributes 'Manifest-Version': version
attributes 'Created-By': 'tengen'
}
}
//生成源码jar
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
destinationDir = file('dist')
}
//生成javadoc的jar
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
destinationDir = file('dist')
}
artifacts {
archives jar
archives sourcesJar
archives javadocJar
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/andy521/codgen.git
git@gitee.com:andy521/codgen.git
andy521
codgen
codgen
master

搜索帮助