Answer the question
In order to leave comments, you need to log in
New package in Gradle?
Good day! Haven't had time to deal with gradle yet, so there is a blunt. I generate proto files in folder /src/main/kotlin/tutorial
and IntelliJ seems to see new classes, but gradle swears
Error:
Gradle file:
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
id("org.springframework.boot") version "2.5.7"
id("io.spring.dependency-management") version "1.0.11.RELEASE"
kotlin("jvm") version "1.5.31"
kotlin("plugin.spring") version "1.5.31"
}
sourceSets {
}
group = "com.lightswitch"
version = "0.0.1-SNAPSHOT"
java.sourceCompatibility = JavaVersion.VERSION_11
repositories {
mavenCentral()
}
dependencies {
implementation("org.springframework.boot:spring-boot-starter") {
exclude("org.springframework.boot", "spring-boot-starter-logging")
}
implementation("org.springframework.boot:spring-boot-starter-log4j2")
implementation("org.jetbrains.kotlin:kotlin-reflect")
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
testImplementation("org.apache.hadoop:hadoop-hdfs:3.3.1")
implementation("org.apache.hadoop:hadoop-common:3.3.1")
implementation("org.apache.hadoop:hadoop-mapreduce-client-core:3.3.1")
implementation("org.apache.hadoop:hadoop-client:3.3.1")
implementation("org.apache.solr:solr-solrj:8.11.0")
implementation("org.apache.solr:solr-core:8.11.0")
implementation("org.apache.solr:solr-common:1.3.0")
implementation("org.apache.tika:tika-core:2.1.0")
implementation("org.apache.tika:tika-parsers:2.1.0")
implementation("com.google.protobuf:protobuf-java:3.19.1")
implementation("com.google.protobuf:protobuf-kotlin:3.19.1")
implementation("org.jsoup:jsoup:1.14.3")
testImplementation("org.apache.hadoop:hadoop-hdfs:3.3.1")
testImplementation("org.springframework.boot:spring-boot-starter-test")
}
sourceSets {
main {
java {
setSrcDirs(listOf("src/kotlin"))
}
resources {
setSrcDirs(listOf("src/resources"))
}
}
}
tasks.withType<KotlinCompile> {
kotlinOptions {
freeCompilerArgs = listOf("-Xjsr305=strict")
jvmTarget = "11"
}
}
tasks.withType<Test> {
useJUnitPlatform()
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question