2 Star 3 Fork 0

今儿个需努力/ICE Zeroc Demo

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
build.gradle 2.59 KB
一键复制 编辑 原始数据 按行查看 历史
qingguow 提交于 2018-04-28 15:55 . 调整依赖配置
group 'com.guo'
version '1.0-SNAPSHOT'
// 所有子项目的通用配置
subprojects {
apply plugin: 'java'
version = '1.0'
/***
* 编译版本
*/
sourceCompatibility = 1.8
targetCompatibility = 1.8
// java编译的时候缺省状态下会因为中文字符而失败
[compileJava,compileTestJava,javadoc]*.options*.encoding = 'UTF-8'
sourceSets {
main {
java {
srcDirs = ['src/main/java']
}
resources {
srcDirs = ['src/main/resources','src/main/java']
}
}
}
//定义版本号
ext {
iceVersion = '3.7.0'
}
//将src文件夹中的资源文件同时打包
repositories {
maven{ url 'http://maven.aliyun.com/nexus/content/groups/public/'}
mavenCentral()
}
jar {
manifest {
attributes("Implementation-Title": "Gradle")
}
}
configurations {
// 所有需要忽略的包定义在此
// all*.exclude group: 'commons-httpclient'
//all*.exclude group: 'commons-logging'
//all*.exclude group: 'commons-beanutils', module: 'commons-beanutils'
}
dependencies {
/***
* ICE
*/
compile "com.zeroc:ice:$iceVersion"
compile "com.zeroc:icegrid:${iceVersion}"
compile "com.zeroc:icestorm:${iceVersion}"
compile "com.zeroc:icebox:${iceVersion}"
/***
* 测试资源
*/
testCompile group: 'junit', name: 'junit', version: '4.12'
// 依赖maven中不存在的jar
ext.jarTree = fileTree(dir: 'libs', include: '**/*.jar')
ext.rootProjectLibs = new File(rootProject.rootDir, 'libs').getAbsolutePath()
ext.jarTree += fileTree(dir: rootProjectLibs, include: '**/*.jar')
compile jarTree
}
/***
* 显示当前项目下所有用于 compile 的 jar.资源列表
*/
task listJars(description: 'Display all compile jars.') << {
configurations.compile.each { File file -> println file.name }
}
/***
* 清除任务:清除编译目录
*/
task clearBuild(type:Delete){
delete 'build','target'
}
/***
* 复制任务:copy依赖jar
* 复制运行时依赖的jar
*/
task copyJarDependents(type:Copy){
from configurations.runtime
into ('build/libs/lib')
}
/***
* 构建任务:执行打包,copy依赖
*/
task release(type: Copy,dependsOn: [build,copyJarDependents]) {
// from 'conf'
// into ('build/libs/eachend/conf') // 目标位置
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/suProgram/ice-demo.git
git@gitee.com:suProgram/ice-demo.git
suProgram
ice-demo
ICE Zeroc Demo
master

搜索帮助

D67c1975 1850385 1daf7b77 1850385