Author :
jar {
//清单文件配置
manifest {
attributes 'Manifest-Version': '1.0'
attributes 'Implementation-Title': '这是程序主程序'
// attributes 'JavaFX-Preloader-Class': 'com.janloong.fxpreloader.MainPreloader'
attributes 'Implementation-Version': ''
attributes 'Permissions': 'sandbox'
attributes 'JavaFX-Version': '8.0'
attributes 'Class-Path': 'lib/core-8.0.1.jar '+'lib/datafx-8.0.1.jar '+'lib/flow-8.0.1.jar ' +
''+'lib/fontawesomefx-commons-8.15.jar '+'lib/fontawesomefx-commons-8.15.jar '
// attributes 'Class-Path': 'FXpreloader.jar'
attributes 'Created-By': 'JavaFX Packager'
attributes 'Implementation-Vendor': ''
attributes 'Main-Class': 'com.janloong.fxworld.MainApp'
}
<!-- 把所有运行时的jar都打入jar中-->
into('lib') {
from configurations.runtime
}
}
sourceSets {
//设置源代码所在目录
main {
java {
srcDirs = ['src']
}
}
//设置测试代码所在目录
test {
java {
srcDirs = ['test']
}
}
}
buildDir = ‘out’
task combineFileContentIncremental {
def sources = fileTree('sourceDir')
def destination = file('destination.txt')
inputs.dir sources
outputs.file destination
doLast {
destination.withPrintWriter { writer ->
sources.each {source ->
writer.println source.text
}
}
}
}
Gradle在默认情况下已经为Project定义了很多Property,其中比较常用的有:
project:Project本身
name:Project的名字
path:Project的绝对路径
description:Project的描述信息 (project.description) 若在task里面则是task本身的描述信息
buildDir:Project构建结果存放目录
version:Project的版本号
dependencies {
compile files('spring-core.jar', 'spring-aap.jar')
compile fileTree(dir: 'deps', include: '*.jar')
}
因篇幅问题不能全部显示,请点此查看更多更全内容
Copyright © 2019- igbc.cn 版权所有 湘ICP备2023023988号-5
违法及侵权请联系:TEL:199 1889 7713 E-MAIL:2724546146@qq.com
本站由北京市万商天勤律师事务所王兴未律师提供法律服务