如何在我的build.gradle

时间:2018-07-12 16:11:21

标签: java gradle build.gradle java-10

我正在制作一个将使用Java 10的Serenity BDD的IntelliJ项目。我正在使用的确切项目是从maven命令构建的(仅针对Selenium-Junit使用选项3):

mvn archetype:generate -Dfilter=serenity

到目前为止,我已在build.gradle中以以下依赖项在Java 10中构建/运行时更正了JAXB异常

compile 'javax.xml.bind:jaxb-api:2.3.0'
compile 'com.sun.xml.bind:jaxb-impl:2.3.0'
compile 'org.glassfish.jaxb:jaxb-runtime:2.3.0'
compile 'javax.activation:activation:1.1.1'

我还安装了Java 10 Jdk(jdk-10.0.1_windows-x64_bin),并将我的项目指向该Jdk。我还找到了将Gradle更新到4.8版的说明,并且也这样做了

我正在尝试处理任何其他兼容性问题,并且试图更好地理解gradle依赖过程。在下面发布了我的整个build.gradle之后,我还需要更改哪些内容以确保build.gradle有助于维护Java 10?

repositories {
    jcenter()
    mavenLocal()
}



buildscript {
    repositories {
        mavenLocal()
        jcenter()
    }
    dependencies {
        classpath("net.serenity-bdd:serenity-gradle-plugin:1.8.3")
    }
}

apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'net.serenity-bdd.aggregator'

sourceCompatibility = 1.8
targetCompatibility = 1.8

dependencies {
    compile 'net.serenity-bdd:serenity-core:1.8.3'
    compile 'net.serenity-bdd:serenity-junit:1.8.3'
    compile 'javax.xml.bind:jaxb-api:2.3.0'
    compile 'com.sun.xml.bind:jaxb-impl:2.3.0'
    compile 'org.glassfish.jaxb:jaxb-runtime:2.3.0'
    compile 'javax.activation:activation:1.1.1'
    compile 'net.serenity-bdd:serenity-rest-assured:1.2.5-rc.11'
    testCompile 'org.slf4j:slf4j-simple:1.7.7'
    testCompile('junit:junit:4.12')
}
gradle.startParameter.continueOnFailure = true

0 个答案:

没有答案