When generating a new application with the options bellow the generator add a line in the wrong place on build.gradle
apply from: 'gradle/docker.gradle'
apply from: 'gradle/sonar.gradle'
hibernate:spring:com.test.domain?dialect=org.hibernate.dialect.PostgreSQL82Dialect&hibernate.physical_naming_strategy=org.springframework.boot.orm.jpa.hibernate.SpringPhysicalNamingStrategy&hibernate.implicit_naming_strategy=org.springframework.boot.orm.jpa.hibernate.SpringImplicitNamingStrategy
apply from: 'gradle/swagger.gradle'
//jhipster-needle-gradle-apply-from - JHipster will add additional gradle scripts to be applied here
It prevents building the project.
Just create a new application with the options bellow.
5.3.1
{
  "generator-jhipster": {
    "promptValues": {
      "packageName": "com.test",
      "nativeLanguage": "en"
    },
    "jhipsterVersion": "5.3.1",
    "applicationType": "monolith",
    "baseName": "hipster",
    "packageName": "com.test",
    "packageFolder": "com/test",
    "serverPort": "8080",
    "authenticationType": "jwt",
    "cacheProvider": "ehcache",
    "enableHibernateCache": true,
    "websocket": "spring-websocket",
    "databaseType": "sql",
    "devDatabaseType": "postgresql",
    "prodDatabaseType": "postgresql",
    "searchEngine": "elasticsearch",
    "messageBroker": false,
    "serviceDiscoveryType": false,
    "buildTool": "gradle",
    "enableSwaggerCodegen": true,
    "jwtSecretKey": "",
    "clientFramework": "angularX",
    "useSass": true,
    "clientPackageManager": "npm",
    "testFrameworks": [
      "cucumber"
    ],
    "jhiPrefix": "jhi",
    "enableTranslation": true,
    "nativeLanguage": "en",
    "languages": [
      "en",
      "pt-br"
    ]
  }
}
entityName.json files generated in the .jhipster directoryWindows 10, jdk 8
Thanks for reporting the issue. This text was removed in https://github.com/jhipster/generator-jhipster/pull/8238. It looks like we have another issue with that configuration though:
Script '/private/tmp/jh/projectname/gradle/swagger.gradle' line: 5
* What went wrong:
A problem occurred evaluating script.
> org.gradle.kotlin.dsl.NamedDomainObjectContainerScope.invoke(Ljava/lang/String;Lkotlin/reflect/KClass;)Ljava/lang/Object;
Yes, I did some research about this error and found it:
openapi-generator-gradle-plugin - Failure with Gradle 4.10
I was going to report it but I did a quick check on the open issues and it looks like the Swagger support will be updated soon.
Cheers.
Try the wrapper we provide it is still 4.9 for some reasons.
On Wed, Sep 12, 2018, 07:59 Carlos Augusto de Oliveira <
[email protected]> wrote:
Yes, I did some research about this error and found it:
[https://github.com/OpenAPITools/openapi-generator/issues/962]
[openapi-generator-gradle-plugin] - Failure with Gradle 4.10 #962
https://github.com/jhipster/generator-jhipster/pull/962I was going to report it but I did a quick check on the open issues and it
looks like the Swagger support will be updated soon.Cheers.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/jhipster/generator-jhipster/issues/8295#issuecomment-420521986,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAMaiempNDjX23prz_KNxYpl7_dJWnNgks5uaKKjgaJpZM4WkldU
.
@atomfrede the wrapper is currently on 4.10 and I wonder if it's not my fault (and if that's the case, I'm deeply sorry). @carloca68 can you try with 4.9 to see if that fixes the issue?
@jdubois Oh I see, didn't realize it. But I had some problems with other plugins and 4.10 and I thought we are still on 4.9 :)
Do you want me to switch back? I guess I did this when working on the jcenter() issues.
Maybe it is enough to document that somewhere and wait for the update of the open api generator as it seems the fix already done.
I will downgrade the wrapper and close this issue afterwards
Thanks!