javaProject.gradle
来源:互联网 发布:mac 把自己改为管理员 编辑:程序博客网 时间:2024/06/08 13:21
dependencies { compile fileTree(dir: rootProject.projectDir.absolutePath + '/lib', include: '**/*.jar')}jar { manifest { attributes("Implementation-Title": "Gradle", "Implementation-Version": rootProject.novatarTargetVersion, "Company" : "SF Express", "JarVersion" : "v" + rootProject.novatarTargetVersionWithDt) } destinationDir = rootProject.destinationDir}task sourcesJar(type: Jar, dependsOn: classes) { classifier = 'sources' from sourceSets.main.allSource destinationDir = rootProject.destinationDir}jar.dependsOn sourcesJarjavadoc.options.memberLevel = JavadocMemberLevel.PRIVATEjavadoc.onlyIf { project.hasProperty('generateJavadoc') && project.property('generateJavadoc') == 'true'}task javadocZip(type: Jar, dependsOn: javadoc) { classifier = "javadoc" from tasks["javadoc"] destinationDir = rootProject.destinationDir}javadocZip.onlyIf { project.hasProperty('generateJavadoc') && project.property('generateJavadoc') == 'true'}eclipse { project { linkedResource name : 'pc-rs', type: '2', location : (project(resourceOutputWebProject).projectDir.absolutePath + "/src/main/webapp/pc-rs") linkedResource name : 'mobile-rs', type: '2', location : (project(resourceOutputWebProject).projectDir.absolutePath + "/src/main/webapp/mobile-rs") } classpath { defaultOutputDir = file(buildDir.name + "/classes/main") file { withXml { def node = it.asNode() def entryTmp = node.classpathentry.find{it.@kind =="src" && it.@path == "src/main/java"} if (null != entryTmp){ entryTmp.attributes()['output'] = buildDir.name + '/classes/main'; } entryTmp = node.classpathentry.find{it.@kind =="src" && it.@path == "src/test/java"} if (null != entryTmp){ entryTmp.attributes()['output'] = buildDir.name + '/classes/test'; } entryTmp = node.classpathentry.find{it.@kind =="src" && it.@path == "src/main/resources"} if (null != entryTmp){ entryTmp.attributes()['output'] = buildDir.name + '/resources/main'; } entryTmp = node.classpathentry.find{it.@kind =="src" && it.@path == "src/test/resources"} if (null != entryTmp){ entryTmp.attributes()['output'] = buildDir.name + '/resources/test'; } def tree = files {file(projectDir.absolutePath + '/src/main/resources/META-INF/resources/pc-rs').listFiles()} def exclude = "" def idx = 2 tree.each {File file -> node.children().add(idx++, new Node(null, "classpathentry", [kind:'src', path:'src/main/resources/META-INF/resources/pc-rs/' + file.name, output : 'pc-rs/' + file.name])) if (exclude != '') { exclude += "|" } exclude += ("META-INF/resources/pc-rs/" + file.name + "/").replaceAll('\\.', '/') + "|META-INF/resources/pc-rs/" + file.name + "/" } tree = files {file(projectDir.absolutePath + '/src/main/resources/META-INF/resources/mobile-rs').listFiles()} tree.each {File file -> node.children().add(idx++, new Node(null, "classpathentry", [kind:'src', path:'src/main/resources/META-INF/resources/mobile-rs/' + file.name, output : 'mobile-rs/' + file.name])) if (exclude != '') { exclude += "|" } exclude += ("META-INF/resources/mobile-rs/" + file.name + "/").replaceAll('\\.', '/') + "|META-INF/resources/mobile-rs/" + file.name + "/" } if (exclude != ''){ node.classpathentry.find{it.@kind =="src" && it.@path == "src/main/resources"}.attributes()['excluding'] = exclude } } } }}
0 0
- javaProject.gradle
- JDT学习之JavaProject
- javaproject 用axis2发布
- JAVA.SWT/JFace: 创建JavaProject
- jetty6 嵌入到 javaproject中
- JavaProject实 训 报 告 书
- javaProject打包和服务发布解决方案
- tomcat一起部署 javaProject 和 j2eeProject
- javaProject中如何读取资源文件
- javaProject打包和服务发布解决方案
- maven javaproject工程打可执行jar包
- 把普通的JavaProject变成MavenProject
- Eclipse如何导入一个已有的javaproject
- Gradle
- gradle
- gradle
- gradle
- gradle
- Mac sublime3安装插件
- select2表单带出编辑,多选赋值问题
- 对大学linux的总结
- build.gradle
- brew install mongo
- javaProject.gradle
- javascript 创建对象——类,继承
- rabbitMQ 命令
- Why L1 norm for sparse models?
- cpp12.8
- POJ 1077 八数码问题
- webappProject.gradle
- Ember 从0到1
- Android中的string资源占位符及Plurals string