Code Monkey home page Code Monkey logo

jhipster-kotlin's Introduction


About

Kotlin + JHipster = KHipster

Documentation and information about KHipster is available here

Full documentation and information about JHipster is available here


Build status

Angular

React

Greetings, Kotlin Hipster!

NPM version Dependency Status

๐Ÿš€ How to get started

Install the package with npm install -g generator-jhipster-kotlin

  1. Install the package with npm install -g generator-jhipster-kotlin
  2. Create and navigate to a directory
  3. Generate the application with khipster

Using Docker

Download the Dockerfile:

mkdir docker
cd docker
wget https://github.com/jhipster/jhipster-kotlin/raw/main/docker/Dockerfile

Build the Docker images:

docker build -t jhipster-generator-kotlin:latest .

Make a folder where you want to generate the Service:

mkdir service
cd service

Run the generator from image to generate service:

docker run -it --rm -v $PWD:/home/khipster/app jhipster-generator-kotlin

Run and attach interactive shell to the generator docker container to work from inside the running container:

docker run -it --rm -v $PWD:/home/khipster/app jhipster-generator-kotlin /bin/bash

๐Ÿšฆ What we have now

โœ… General App generation - khipster

โœ… Spring Controller - khipster spring-controller <controller-name>

โœ… Spring Service - khipster spring-service <service-name>

โœ… Entity generation - khipster entity <entity-name>

โค๏ธ for community

Found an issue, let us know here.

Interested in contributing, check out our contributing guide to get started.

Any questions sendilkumarn

jhipster-kotlin's People

Contributors

amatosg avatar atomfrede avatar codecholeric avatar danielfran avatar deepu105 avatar dependabot[bot] avatar dschulz avatar egvimo avatar emilpaw avatar isaul32 avatar jhcao23 avatar jhipster-bot avatar leonardortlima avatar leozin avatar mathieuaa avatar murdos avatar pascalgrimaud avatar pvliss avatar rainerh avatar rajpratik71 avatar romancha avatar rotenkampf avatar ruddell avatar sendilkumarn avatar sudharakap avatar teobais avatar tharakadesilva avatar thejavaguy avatar vishal423 avatar zomzog avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jhipster-kotlin's Issues

Gradle Task :bootRun fails: Error: Could not find or load main class

When running ./gradlew on Windows 10 using JHipster 6.0.0-beta.0 for a newly created project, the script fails:

> Task :bootRun FAILED
Error: Could not find or load main class ...

FAILURE: Build failed with an exception.

When looking at the bootRun task:

    bootRun {
        dependsOn classpathJar
        doFirst {
            classpath = files("$buildDir/classes/java/main", "$buildDir/resources/main", classpathJar.archivePath)
        }
    }

it seems that the Kotlin directory is not included. I tried to add "$buildDir/classes/kotlin/main" at the beginning of the classpath, but although the needed class is clearly there, it made no difference.

Note that ./gradlew bootJar produces a functional .jar file and running it with java -jar build/libs/appname-0.0.1-SNAPSHOT.jar works.

[ x ] Checking this box is mandatory (this is just to show you read everything)

Enable Azule Pipelines build

Overview of the issue

As per title, to enable Azure Pipelines CI build similar to the parent JHipster project

Motivation for or Use Case

Not sure if this is really needed for the Kotlin blueprint but since I show an azure-pipelines.yml file within the project and was easy to implement, I went ahead and fixed it.

Reproduce the error

N/A

Link to PR (if any)

#79

JHipster Version(s)

Current master(5.7.3)
[x] Checking this box is mandatory (this is just to show you read everything)

Feature parity with parent Java project

Overview of the issue

This is a list of generators and their sub-packages provided by the parent JHipster project in Java and need to be migrated to Kotlin:

1st level: Generators:
2nd level: Packages

- [ ] aws-containers Removing this based on our discussion.

  • entity-server
  • server
    • aop
    • client (93)
    • config (#86)
    • domain (#91)
    • gateway (#91)
    • repository (#91)
    • security (#91)
    • service (#91)
    • web (#91)
    • cucumber (tests only) (#91)
  • spring-controller
  • spring-service

NOTES:

  1. Tests are not mentioned in the list but should be done alongside the main code
  2. The order is alphabetical

Motivation for or Use Case

Achieve feature parity with parent JHipster Java project

JHipster Version(s)

6.x

[x] Checking this box is mandatory (this is just to show you read everything)

Unable to generate Gradle project with Gatling enabled

When I try to generate a Microservice gateway project with Gradle as build tool and Gatling support enabled, the generation will fail. Generating the same project with Maven as build tools works.

Reproduce the error

Which *type* of application would you like to create? Microservice gateway
? What is the base name of your application? gateway
Trying to use blueprint generator-jhipster-kotlin
? As you are running in a microservice architecture, on which port would like your server to run? It should be unique to avoid port confl
icts. 8080
? What is your default Java package name? com.test.kotlin
? Which service discovery server do you want to use? JHipster Registry (uses Eureka, provides Spring Cloud Config support and monitoring 
dashboards)
? Which *type* of authentication would you like to use? JWT authentication (stateless, with a token)
? Which *type* of database would you like to use? SQL (H2, MySQL, MariaDB, PostgreSQL, Oracle, MSSQL)
? Which *production* database would you like to use? MariaDB
? Which *development* database would you like to use? MariaDB
? Do you want to use Hibernate 2nd level cache? Yes
? Would you like to use Maven or Gradle for building the backend? Gradle
? Which other technologies would you like to use? Search engine using Elasticsearch
Trying to use blueprint generator-jhipster-kotlin
WARNING! No blueprint found for client falling back to default generator
? Which *Framework* would you like to use for the client? Angular 6
? Would you like to enable *SASS* stylesheet preprocessor? Yes
? Would you like to enable internationalization support? Yes
? Please choose the native language of the application English
? Please choose additional languages to install Dutch, French, German, Italian, Japanese, Polish, Spanish
? Besides JUnit and Jest, which testing frameworks would you like to use? Gatling, Cucumber, Protractor
? Would you like to install other generators from the JHipster Marketplace? No
events.js:183
      throw er; // Unhandled 'error' event
      ^

Error: ERROR! Copying template ../../../node_modules/generator-jhipster/generators/server/templates/gradle/gatling.gradle.ejs failed. [Error: ENOENT: no such file or directory, open '/usr/lib/node_modules/generator-jhipster-kotlin/node_modules/generator-jhipster/generators/server/templates/gradle/gatling.gradle.ejs']
    at Environment.error (/usr/lib/node_modules/generator-jhipster/node_modules/yeoman-environment/lib/environment.js:157:40)
    at module.exports.error (/usr/lib/node_modules/generator-jhipster-kotlin/node_modules/generator-jhipster/generators/generator-base.js:1978:18)
    at ejs.renderFile (/usr/lib/node_modules/generator-jhipster-kotlin/node_modules/generator-jhipster/generators/utils.js:197:23)
    at tryHandleCache (/usr/lib/node_modules/generator-jhipster-kotlin/node_modules/generator-jhipster/node_modules/ejs/lib/ejs.js:254:14)
    at Object.exports.renderFile (/usr/lib/node_modules/generator-jhipster-kotlin/node_modules/generator-jhipster/node_modules/ejs/lib/ejs.js:482:10)
    at Object.renderContent (/usr/lib/node_modules/generator-jhipster-kotlin/node_modules/generator-jhipster/generators/utils.js:193:9)
    at module.exports.template (/usr/lib/node_modules/generator-jhipster-kotlin/node_modules/generator-jhipster/generators/generator-base-private.js:636:23)
    at module.exports.writeServerBuildFiles (/usr/lib/node_modules/generator-jhipster-kotlin/generators/server/files.js:197:26)
    at Object.<anonymous> (/usr/lib/node_modules/generator-jhipster-kotlin/node_modules/generator-jhipster/node_modules/yeoman-generator/lib/index.js:399:25)
    at /usr/lib/node_modules/generator-jhipster-kotlin/node_modules/run-async/index.js:25:25

Related issues
Link to PR (if any)
JHipster Version(s) --> 5.3.4
[x] Checking this box is mandatory (this is just to show you read everything)

Error while generating

I setup as mentioned in README. And started generating a new app:
jhipster --blueprint generator-jhipster-kotlin

I get the following error:

Error: ERROR! Copying template ../../../node_modules/generator-jhipster/generators/server/templates/src/main/java/package/config/ThymeleafConfiguration.java.ejs failed. 
[Error: ENOENT: no such file or directory, open '/Users/hberndt/Projects/jhipster-kotlin/node_modules/generator-jhipster/generators/server/templates/src/main/java/package/config/ThymeleafConfiguration.java.ejs']

I am very interested in contributing to this project because I like kotlin and made a kotlin microservice based on prior JHipster generated app manuelly.

Any help appreciated.

JHipster Version(s): actual master branch (linked via yarn link)

[X] Checking this box is mandatory (this is just to show you read everything)

repository/SocialUserConnectionRepository doesn't have return types for delete functions

The return type for the delete functions are only generated for databaseType === 'couchbase'. For others there are no return type(s) defined which causes the delete functions to be generated without a return type:

fun deleteByUserIdAndProviderId(userId: String, providerId: String):

fun deleteByUserIdAndProviderIdAndProviderUserId(userId: String, providerId: String, providerUserId: String):

Potential fix: should probably add an else clause to set the return type to Void.

Migrate entity generator into Kotlin

Migrate the existing entity generator to Kotlin

This will include

  • migrating the resource files
  • migrating the repositories
  • migrating the domain
  • migrating the service layer

Service Generation

The jhipster-kotlin is not yet generating Service/ServiceImpl classes. I might have some time to get that done unless any one is already working on that.

Update to Kotlin 1.3.11

Update to the latest Kotlin stable, namely 1.3.11

[x] Checking this box is mandatory (this is just to show you read everything)

installation not detected in JHipster

When I try to generate a project with JHipster using this plugin, JHipster complains that it is not installed.

Following the instructions in the readme:

$ npm install -g generator-jhipster-kotlin
+ [email protected]
updated 1 package in 12.901s
$ jhipster --blueprint kotlin
INFO! Using JHipster version installed globally
INFO! Running default command
INFO! Executing jhipster:app
INFO! Options: blueprint: kotlin, from-cli: true

...

Welcome to JHipster v5.7.0

...

events.js:167
      throw er; // Unhandled 'error' event
      ^

Error: ERROR! The generator-jhipster-kotlin blueprint provided is not installed. Please install it using command npm i -g generator-jhipster-kotlin.
    at Environment.error (/Users/nglenn/.config/yarn/global/node_modules/generator-jhipster/node_modules/yeoman-environment/lib/environment.js:157:40)
    at module.exports.error (/Users/nglenn/.config/yarn/global/node_modules/generator-jhipster/generators/generator-base.js:2444:18)
    at shelljs.exec (/Users/nglenn/.config/yarn/global/node_modules/generator-jhipster/generators/generator-base-private.js:794:22)
    at /Users/nglenn/.config/yarn/global/node_modules/shelljs/src/exec.js:124:9
    at ChildProcess.exithandler (child_process.js:301:5)
    at ChildProcess.emit (events.js:182:13)
    at maybeClose (internal/child_process.js:978:16)
    at Socket.stream.socket.on (internal/child_process.js:395:11)
    at Socket.emit (events.js:182:13)
    at Pipe._handle.close (net.js:616:12)
Emitted 'error' event at:
    at Environment.error (/Users/nglenn/.config/yarn/global/node_modules/generator-jhipster/node_modules/yeoman-environment/lib/environment.js:159:15)
    at module.exports.error (/Users/nglenn/.config/yarn/global/node_modules/generator-jhipster/generators/generator-base.js:2444:18)
    [... lines matching original stack trace ...]
    at Pipe._handle.close (net.js:616:12)

JHipster version v5.7.0, Node version v11.3.0

[X] Checking this box is mandatory (this is just to show you read everything)

No docs for entity generation

No Documentation provided on how to use the tool
I started using jhipster-kotlin and managed to create the app with the data in the Readme page, when I wanted to generate a new entity I did but it was generated as Java. Searching on the issues I saw that the entities are generated as Kotlin and the issue is closed, but no documentation on how to do it is provided.

Related issues: #45
JHipster Version(s) 5

[ x] Checking this box is mandatory (this is just to show you read everything)

Fix the failing gradle build in CLI

This is super annoying, we can build the project in IntelliJ without any issues but in the command line it is having a problem, compileJava cannot find the Kotlin compiled classes

After hours and hours of debugging, the root cause is because Java cannot find the detect types of Kotlin compiled classes

While this code fails in CLI

fun getAccount(): UserDTO {
        return userService.getUserWithAuthorities()
            .map { UserDTO(it) }
            .orElseThrow { InternalServerErrorException("User could not be found") }
    }

but this passes in CLI

fun getAccount(): UserDTO {
        val user = userService.getUserWithAuthorities()?: throw InternalServerErrorException("User could not be found")
        return UserDTO(user.get())
    }

Bugfix: Pass command line arguments to application

Overview of the issue
The generated Kotlin application does not pass command line arguments on to the application.

Motivation for or Use Case
Fix the bug

Reproduce the error
Start application with prod profile, the dev profile ist still being used.

Related issues
none

Link to PR (if any)
#47

JHipster Version(s)
5.4.2 and earlier

[X] Checking this box is mandatory (this is just to show you read everything)

Messages are duplicated

Overview of the issue

Running khipster entity Category will show the questions twice, like this:

This also happens when a user is asked if file should be overridden or ignored.

Motivation for or Use Case

I think this is self-explanatory.

Reproduce the error

Run khipster entity Category or simply khipster in an existant project.

Related issues

None

JHipster Version(s)

0.8.0

  • Checking this box is mandatory (this is just to show you read everything)

Migration to micrometer

Following the migration to micrometer, some codes need to be migrated too.
Otherwise, it won't compile with current master of generator-jhipster

Issue template is missing come chars

Overview of the issue

  1. Each element in the template should start with ##
  2. The check at the end of the ticket should be -[ ] so it will be rendered as a checkbox

Motivation for or Use Case

It makes the final issue more readable

Reproduce the error

Does not apply

Related issues

None

Link to PR (if any)

None

JHipster Version(s)

Does not apply
-[ ] Checking this box is mandatory (this is just to show you read everything)

Use the JHipster release instead of master in CI

Currently, we are using JHipster's master branch as the base when testing in the CI.

Instead use JHipster release version for testing the CI. This will make the build more stable.

cc: @pascalgrimaud this is might be something that interests you โค๏ธ

Update Travis

The Travis build needs to be updated, using the new folder test-integration as the travis folder is deprecated and will be deleted in future.

@sendilkumarn : can you assign me to this ticket plz ? So I won't forget to do it

Enable gradle test in CI

Currently the CI is setup only for the maven. We can enable gradle too for testing.

P.S. Add some entites too for testing

Consider using a Koltin linter

Overview of the issue

I think we should consider using a Kotlin linter such as https://github.com/shyiko/ktlint for the generated projects.

Motivation for or Use Case

Have properly formatted generated code according to the official code style and not have to pin-point every little formatting issue at the generator.

[x ] Checking this box is mandatory (this is just to show you read everything)

Add travis to the project

We can add travis to this project, to test the default cases atleast at first or else copy the same testing with what we have in the main project.

Improve generated gradle build script

Hi,
To start with..
the generated build script is simply not compileable because of the version in properties file which is
2.0.0-20180313.135554-7 and some other stuff.
it is already 2.0.8 available.. Ok, it is not the latest but Why is it the snapshot with 20180313.135554...... which is not very great to put in publicly available template (I mean should this not be always a stable one?)
The script

import org.gradle.internal.os.OperatingSystem

buildscript {
    repositories {
        mavenLocal()
        jcenter()
        maven { url "http://repo.spring.io/plugins-release" }
        maven { url "https://plugins.gradle.org/m2/" }
        // TODO To remove after final Spring Boot 2 release
        maven { url "https://repo.spring.io/milestone" }
        maven { url "https://repo.spring.io/snapshot" }
        maven { url "https://dl.bintray.com/jhipster/maven" }
    }
    dependencies {
        classpath "org.springframework.boot:spring-boot-gradle-plugin:${spring_boot_version}"
        classpath "io.spring.gradle:propdeps-plugin:0.0.9.RELEASE"
        classpath "gradle.plugin.org.detoeuf:swagger-codegen-plugin:1.7.4"
        classpath "gradle.plugin.com.gorylenko.gradle-git-properties:gradle-git-properties:1.4.17"
        classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.2.30'
        classpath 'org.jetbrains.kotlin:kotlin-allopen:1.2.30'
        //jhipster-needle-gradle-buildscript-dependency - JHipster will add additional gradle build script plugins here
    }
}

plugins {
    id "org.sonarqube" version "2.6.2"
    id "net.ltgt.apt-eclipse" version "0.15"
    id "net.ltgt.apt-idea" version "0.15"
    id "net.ltgt.apt" version "0.15"
    id "io.spring.dependency-management" version "1.0.3.RELEASE"
    id "com.moowork.node" version "1.2.0"
    //jhipster-needle-gradle-plugins - JHipster will add additional gradle plugins here
}

apply plugin: 'java'
sourceCompatibility=1.8
targetCompatibility=1.8
// Until JHipster supports JDK 9
assert System.properties['java.specification.version'] == '1.8'

apply plugin: 'maven'
apply plugin: 'org.springframework.boot'
apply plugin: 'war'
apply plugin: 'propdeps'
apply plugin: 'com.moowork.node'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'idea'

dependencyManagement {
  imports {
    mavenBom 'io.github.jhipster:jhipster-dependencies:' + jhipster_dependencies_version
    //jhipster-needle-gradle-dependency-management - JHipster will add additional dependencies management here
  }
}

defaultTasks 'bootRun'

group = 'com.example'
version = '0.0.1-SNAPSHOT'

description = ''

bootWar {
   mainClassName = 'com.example.App'
}

war {

}

springBoot {
    mainClassName = 'com.example.App'
    buildInfo()
}

if (OperatingSystem.current().isWindows()) {
    task pathingJar(type: Jar) {
        dependsOn configurations.runtime
        appendix = 'pathing'

        doFirst {
            manifest {
                attributes 'Class-Path': configurations.runtime.files.collect {
                    it.toURI().toURL().toString().replaceFirst(/file:\/+/, '/').replaceAll(' ', '%20')
                }.join(' ')
            }
        }
    }

    bootRun {
        dependsOn pathingJar
        doFirst {
            classpath += files("$buildDir/classes/java/main", "$buildDir/resources/main", pathingJar.archivePath)
        }
    }
}

test {
    exclude '**/CucumberTest*'

    // uncomment if the tests reports are not generated
    // see https://github.com/jhipster/generator-jhipster/pull/2771 and https://github.com/jhipster/generator-jhipster/pull/4484
    // ignoreFailures true
    reports.html.enabled = false
}

task testReport(type: TestReport) {
    destinationDir = file("$buildDir/reports/tests")
    reportOn test
}


apply from: 'gradle/docker.gradle'
apply from: 'gradle/sonar.gradle'
apply from: 'gradle/liquibase.gradle'
apply from: 'gradle/mapstruct.gradle'
apply from: 'gradle/swagger.gradle'
apply from: 'gradle/kotlin.gradle'
//jhipster-needle-gradle-apply-from - JHipster will add additional gradle scripts to be applied here

if (project.hasProperty('prod')) {
    apply from: 'gradle/profile_prod.gradle'
} else {
    apply from: 'gradle/profile_dev.gradle'
}

if (project.hasProperty('graphite')) {
    apply from: 'gradle/graphite.gradle'
}

if (project.hasProperty('prometheus')) {
    apply from: 'gradle/prometheus.gradle'
}

if (project.hasProperty('zipkin')) {
    apply from: 'gradle/zipkin.gradle'
}

configurations {
    providedRuntime
    compile.exclude module: "spring-boot-starter-tomcat"
}

repositories {
    mavenLocal()
    jcenter()
    // TODO To remove after final Spring Boot 2 release
    maven { url "https://repo.spring.io/milestone" }
    maven { url "https://repo.spring.io/snapshot" }
    maven { url "https://dl.bintray.com/jhipster/maven" }
    //jhipster-needle-gradle-repositories - JHipster will add additional repositories
}

dependencies {
    // TODO To remove after final Spring Boot 2 release
    compile "javax.xml.bind:jaxb-api"
    compile "org.springframework.boot:spring-boot-starter-cache"
    compile "io.github.jhipster:jhipster"
    compile "io.dropwizard.metrics:metrics-core"
    compile "io.dropwizard.metrics:metrics-jcache"
    compile "io.dropwizard.metrics:metrics-json"
    compile "io.dropwizard.metrics:metrics-jvm"
    compile "io.dropwizard.metrics:metrics-servlet"
    compile "io.dropwizard.metrics:metrics-servlets"
    compile "net.logstash.logback:logstash-logback-encoder"
    compile "com.fasterxml.jackson.datatype:jackson-datatype-json-org"
    compile "com.fasterxml.jackson.datatype:jackson-datatype-hppc"
    compile "com.fasterxml.jackson.datatype:jackson-datatype-jsr310"
    compile "com.fasterxml.jackson.datatype:jackson-datatype-hibernate5"
    compile "com.fasterxml.jackson.core:jackson-annotations"
    compile "com.fasterxml.jackson.core:jackson-databind"
    compile "com.fasterxml.jackson.module:jackson-module-afterburner"
    compile "com.ryantenney.metrics:metrics-spring"
    compile "javax.cache:cache-api"
    compile "org.hibernate:hibernate-core"
    compile "com.zaxxer:HikariCP"
    compile "org.apache.commons:commons-lang3"
    compile "commons-io:commons-io"
    compile "javax.transaction:javax.transaction-api"
    compile "org.ehcache:ehcache"
    compile "org.hibernate:hibernate-jcache"
    compile "org.hibernate:hibernate-entitymanager"
    compile "org.hibernate:hibernate-envers"
    compile "org.hibernate.validator:hibernate-validator"
    compile "org.liquibase:liquibase-core"
    compile "com.mattbertolini:liquibase-slf4j"
    compile "org.springframework.boot:spring-boot-loader-tools"
    compile "org.springframework.boot:spring-boot-starter-mail"
    compile "org.springframework.boot:spring-boot-starter-logging"
    compile ("org.springframework.boot:spring-boot-starter-actuator") {
        exclude module: 'micrometer-core'
    }
    compile "org.springframework.boot:spring-boot-starter-aop"
    compile "org.springframework.boot:spring-boot-starter-data-jpa"
    compile "org.springframework.boot:spring-boot-starter-data-elasticsearch"
    // needed to get around elasticsearch stacktrace about jna not found
    // https://github.com/elastic/elasticsearch/issues/13245
    compile "net.java.dev.jna:jna"
    compile "org.springframework.boot:spring-boot-starter-security"
    compile ("org.springframework.boot:spring-boot-starter-web") {
        exclude module: 'spring-boot-starter-tomcat'
    }
    compile "org.springframework.boot:spring-boot-starter-undertow"
    compile "org.springframework.boot:spring-boot-starter-thymeleaf"
    compile "org.zalando:problem-spring-web"
    compile "org.springframework.cloud:spring-cloud-starter-netflix-eureka-client"
    compile "org.springframework.cloud:spring-cloud-starter-config"
    compile "org.springframework.cloud:spring-cloud-spring-service-connector"
    compile "org.springframework.security:spring-security-config"
    compile "org.springframework.security:spring-security-data"
    compile "org.springframework.security:spring-security-web"
    compile "io.jsonwebtoken:jjwt"
    compile ("io.springfox:springfox-swagger2") {
        exclude module: 'mapstruct'
    }
    compile "io.springfox:springfox-bean-validators"
    compile "mysql:mysql-connector-java"
    compile "org.mapstruct:mapstruct-jdk8:${mapstruct_version}"
    compile "org.apache.httpcomponents:httpclient"
    compile "org.springframework.social:spring-social-security"
    compile "org.springframework.social:spring-social-google"
    compile "org.springframework.social:spring-social-facebook"
    compile "org.springframework.social:spring-social-twitter"
    testCompile "com.jayway.jsonpath:json-path"
    testCompile ("org.springframework.boot:spring-boot-starter-test") {
        exclude group: 'com.vaadin.external.google', module: 'android-json'
    }
    testCompile "org.springframework.security:spring-security-test"
    testCompile "org.springframework.boot:spring-boot-test"
    testCompile "org.assertj:assertj-core"
    testCompile "junit:junit"
    testCompile "org.mockito:mockito-core"
    testCompile "com.mattbertolini:liquibase-slf4j"
    testCompile "org.hamcrest:hamcrest-library"
    optional ("org.springframework.boot:spring-boot-configuration-processor") {
        exclude group: 'com.vaadin.external.google', module: 'android-json'
    }
    //jhipster-needle-gradle-dependency - JHipster will add additional dependencies here
}

task cleanResources(type: Delete) {
    delete 'build/resources'
}

task wrapper(type: Wrapper) {
    gradleVersion = '4.6'
}

task stage(dependsOn: 'bootWar') {
}

if (project.hasProperty('nodeInstall')) {
    node {
        version = "${node_version}"
        npmVersion = "${npm_version}"
        yarnVersion = "${yarn_version}"
        download = true
    }
}

compileJava.dependsOn processResources
processResources.dependsOn cleanResources,bootBuildInfo
bootBuildInfo.mustRunAfter cleanResources

I am not sure that should have been ever released as the quality of generated script is somewhat.. Not trying to be an ass, just simply it is Honestly somewhat..
Is it some kind of automatic templating so that even template wi not what some has manually wrote? If so, it's understandable that sometimes it would be not great if not - not understandable...
compile and runtime configs are deprecated. Gradle provided native BOM support now as well as annotationProcessor configuration (if not even mention of Kotlin scripts). buildscript { } in this particular configuration can be omitted (and should be, I belevive for the sake of modernize the approach as this was introduced in Gradle 2.12!! (years ago))

I would gladly make a PR later (I will push myself to do so) , can you tell me it this is relevant? Is this repo is alive and will further be in development? Do you wish to keep Groovy or use Kotlin (pref) ? And why the generated project is like half of Kotlin and another half is plain Java?

Edit

Also org.detoeuf.swagger-codegen is deprecated

[Suggestion] Keep existing JHipster java config code and use kotlin only for entities

As I currently understand it, this module is forking the entire server generator code and migrating it to Kotlin. But with this approach it will be highly likely that the blueprint will break in strange ways as the java code evolve without taking this module into account. The cost of maintaining two versions of the same code in different languages is high and especially as it's in different repos, we don't have visibility when changes in the main generator will cause dependent modules to break.

I would suggest to setup java compilation alongside kotlin with maven/gradle and keep most of the upstream backend code as java. After all this code is rarely changed and as there is not much logic there so it does no benefit too much from kotlin features.

Of course this could be offered as an option.

Failed to compile on fresh KHipster project generation

With JHipster 5.1.0 and lastest jhipster-kotlin blueprint, on a fresh monili I have 2 compilation error :

  • AuditResource#get -> id is a String instead of Long
  • UserService#getUserWithAuthorities -> id is a String instead of Long
    kotlinCompileBug.txt

[x] Checking this box is mandatory (this is just to show you read everything)

Kotlin blueprint in docker (after npm install) reports no kotlin generator

Overview of the issue
When using docker for the JHipster generation step, then installing the kotlin generator from npm, and running the kotlin blueprint, JHipster reports that there is no server or common blueprint and falls back to the default generator, only producing Java files.

Motivation for or Use Case

  1. This is a supported method from the JHipster project.
  2. I work on a couple Java, Kotlin and JS/npm projects, so I like to keep all my dev envs in docker so that I don't get global dependency issues when installed globally.

Reproduce the error

  • mkdir ~/jhipster
  • docker container run --name jhipster -v ~/jhipster:/home/jhipster/app -v ~/.m2:/home/jhipster/.m2 -p - 8080:8080 -p 9000:9000 -p 3001:3001 -d -t jhipster/jhipster
  • docker container exec -it jhipster bash
    • (inside the container)
    • npm install -g generator-jhipster-kotlin
    • jhipster --blueprint kotlin

Related issues
None that I could find

Link to PR (if any)

JHipster Version(s)
5.6.0 (experienced in 5.5 as well)

[x] Checking this box is mandatory (this is just to show you read everything)

Update to JHipster 5.7.2

Update to JHipster 5.7.2

[x] Checking this box is mandatory (this is just to show you read everything)

JDL import doesn't import entities

Overview of the issue

when running khipster --import-jdl file.jh entities are not imported and messages are duplicated (as in #123).

A workaround is to copy an existing .jhipster folder and run khipster --with-entities

Motivation for or Use Case

This feature should work as expected ;)

Reproduce the error

Just run the command :)

Related issues

#123

Link to PR (if any)

None yet

JHipster Version(s)

0.8.0

  • Checking this box is mandatory (this is just to show you read everything)

Kotlin for UI modules

Was wondering if it'd be possible to add Kotlin for UI modules generated for Angular and Kotlin.

Update to JHipster 5.8.1

Update to JHipster 5.8.1

[x] Checking this box is mandatory (this is just to show you read everything)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.