JsonSchema2Pojo如何与Gradle一起使用

问题描述

我试图将jsonshema2pojo与gradle一起使用,所以我安装了此插件https://github.com/eirnym/js2p-gradle,当我尝试构建时,我的目标中有一个generate-source文件夹,但它为空。 我是gradle的新手,但我不完全了解build.gradle的合奏:

plugins {
   id 'java'
   id 'com.github.eirnym.js2p' version '1.0'
}

repositories {
   mavenCentral()
}

ext {
   sourceCompatibility = JavaVersion.VERSION_1_8
   targetCompatibility = JavaVersion.VERSION_1_8
}

dependencies {
 compile 'javax.validation:validation-api:1.1.0.CR2'
 compile 'com.fasterxml.jackson.core:jackson-databind:2.9.7'

 // see src/main/resources/json/external_dependencies.json
 compile 'joda-time:joda-time:2.2'
}

jsonSchema2Pojo {
 targetPackage = 'example'
 includeJSR303Annotations = true
 propertyWordDelimiters = ['_'] as char[]
}

这是我添加到build.gradle中的插件代码

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)