Upgrade gradle build file from 2.1 to 3.2 openjpa metamodel files not getting generated

plugins

(siddarthasagar) #1

i’ve had my gradle script working for version 2.1 now when i’m trying to update the gradle version to 3+ , there seem to be lot of changes. some that affected the script were

  1. i had to add the statement mainClassName = ‘com.foo.Bar’ in all build scripts which had > application plugin
  2. i had to add the statement checkstyleTest.enabled = false to prevent the build from failing even when i had ignoreFailures = true for the task > checkstyleMain
  3. finally though this doesn’t break the build the intended task for generating metamodel class for entity mapping beans is not working

configurations {
codeGenerationConfig
}

dependencies {
// Add OpenJPA library to classpath
codeGenerationConfig libraries.db
}

compileJava{
classpath = configurations.codeGenerationConfig + configurations.compile
options.compilerArgs = [
’-Aopenjpa.metamodel=true’
]
}

eclipseClasspath.dependsOn compileJava


so can anyone help me out in fixing this.
also is there any tool to migrate build scripts as we upgrade to new versions of gradle or atleast any tool that reports compatibility issues