oyo Java开发_build.gradle

group 'pro.ticktock.base'

version currentVersion

ext.moduleName = 'pro.ticktock.base.javatree'

apply plugin: 'java'

apply plugin: 'java-library'

apply plugin: 'maven-publish'

apply plugin: 'com.jfrog.artifactory'

sourceCompatibility = 10.0

repositories {

jcenter()

}

buildscript {

repositories {

jcenter()

}

dependencies {

classpath(group: 'org.jfrog.buildinfo', name: 'build-info-extractor-gradle', version: '4.+')

}

}

jar {

manifest {

attributes(

"Implementation-Title": "Gradle",

"Implementation-Version": version,

// "Automatic-Module-Name": moduleName

)

}

}

dependencies {

compile 'org.apache.commons:commons-collections4:4.2'

testCompile 'junit:junit:4.12'

}

compileJava {

doFirst {

options.compilerArgs = [

'--module-path', classpath.asPath,

]

classpath = files()

}

}

compileTestJava {

inputs.property("moduleName", moduleName)

doFirst {

options.compilerArgs = [

'--module-path', classpath.asPath,

'--add-modules', 'junit',

'--add-reads', "$moduleName=junit",

'--patch-module', "$moduleName=" + files(sourceSets.test.java.srcDirs).asPath,

]

classpath = files()

}

}

test {

inputs.property("moduleName", moduleName)

doFirst {

jvmArgs = [

'--module-path', classpath.asPath,

'--add-modules', 'ALL-MODULE-PATH',

'--add-reads', "$moduleName=junit",

'--patch-module', "$moduleName=" + files(sourceSets.test.java.outputDir).asPath,

]

classpath = files()

}

}

publishing {

publications {

mavenJava(MavenPublication) {

from components.java

}

}

}

artifactory {

contextUrl = 'http://njmavencenter:5801/artifactory'

publish {

repository {

repoKey = 'syncer' // The Artifactory repository key to publish to

username = "${artifactory_user}" // The publisher user name

password = "${artifactory_password}" // The publisher password

}

defaults {

// Reference to Gradle publications defined in the build script.

// This is how we tell the Artifactory Plugin which artifacts should be

// published to Artifactory.

publications('mavenJava')

publishArtifacts = true

// Properties to be attached to the published artifacts.

properties = ['qa.level': 'basic', 'dev.team' : 'core']

// Publish generated POM files to Artifactory (true by default)

publishPom = true

}

}

resolve {

repoKey = 'jcenter'

}

}

一键复制

编辑

Web IDE

原始数据

按行查看

历史

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值