Котлин-капт ничего не генерирует - PullRequest
0 голосов
/ 08 июня 2018

Я использую Kapt версии 3 с querydsl-4.1.4.Ниже приведен мой build.gradle файл:

buildscript {
    ext {
        kotlinVersion = '1.2.41'
        springBootVersion = '2.0.2.RELEASE'
    }
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
        classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlinVersion}")
        classpath("org.jetbrains.kotlin:kotlin-allopen:${kotlinVersion}")
    }
}

apply plugin: 'java'
apply plugin: 'kotlin'
apply plugin: 'kotlin-spring'
apply plugin: 'eclipse'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'kotlin-kapt'

group = 'com.example.package'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = 1.8

kapt {
    generateStubs = true
    mapDiagnosticLocations = true
}

compileKotlin {
    kotlinOptions {
        freeCompilerArgs = ["-Xjsr305=strict"]
        jvmTarget = "1.8"
    }
}

compileTestKotlin {
    kotlinOptions {
        freeCompilerArgs = ["-Xjsr305=strict"]
        jvmTarget = "1.8"
    }
}

repositories {
    mavenCentral()
}


dependencies {
    kapt 'com.querydsl:querydsl-apt:4.1.4:jpa'

    compile('org.springframework.boot:spring-boot-starter-data-jpa')
    compile('org.springframework.boot:spring-boot-starter-web')
    compile('org.springframework.boot:spring-boot-starter-webflux')
    compile('org.springframework.boot:spring-boot-starter-websocket')
    compile('com.fasterxml.jackson.module:jackson-module-kotlin')
    compile("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
    compile("org.jetbrains.kotlin:kotlin-reflect")
    testCompile('org.springframework.boot:spring-boot-starter-test')
    testCompile('io.projectreactor:reactor-test')
    compile("com.querydsl:querydsl-jpa:4.1.4")
    compile('commons-dbcp:commons-dbcp:1.2.2')
    compile('com.machinezoo.noexception:noexception:1.3.2')
    compile('org.apache.commons:commons-lang3:3.7')
    compile('com.google.code.gson:gson:2.8.2')
}

Процесс сборки выполняется без ошибок, но классы querydsl q не генерируются.Я следовал примеру kotlin-example build.gradle, но ничего не происходит.Более того, я искал на многих сайтах возможное решение и пробовал много разных решений ... но ничего.

...