You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm getting the error bellow after following the kotlin example
The task 'compileDebugAndroidTestKotlin' (org.jetbrains.kotlin.gradle.tasks.KotlinCompile) is not a subclass of the given type (org.gradle.api.tasks.SourceTask).
The task 'compileDebugUnitTestKotlin' (org.jetbrains.kotlin.gradle.tasks.KotlinCompile) is not a subclass of the given type (org.gradle.api.tasks.SourceTask).
The task 'compileDebugKotlin' (org.jetbrains.kotlin.gradle.tasks.KotlinCompile) is not a subclass of the given type (org.gradle.api.tasks.SourceTask).
The task 'compileReleaseUnitTestKotlin' (org.jetbrains.kotlin.gradle.tasks.KotlinCompile) is not a subclass of the given type (org.gradle.api.tasks.SourceTask).
The task 'compileReleaseKotlin' (org.jetbrains.kotlin.gradle.tasks.KotlinCompile) is not a subclass of the given type (org.gradle.api.tasks.SourceTask).
Config
Gradle 7.6
master build.gradle
plugins {
id 'com.android.application' version '7.4.1' apply false
id 'com.android.library' version '7.4.1' apply false
id 'org.jetbrains.kotlin.android' version '1.8.10' apply false
id 'com.google.protobuf' version '0.9.2' apply false
}
module build.grade
plugins {
id 'com.android.library'
id 'org.jetbrains.kotlin.android'
id 'com.google.protobuf'
}
I'm getting the error bellow after following the kotlin example
Config
Gradle 7.6
master build.gradle
plugins {
id 'com.android.application' version '7.4.1' apply false
id 'com.android.library' version '7.4.1' apply false
id 'org.jetbrains.kotlin.android' version '1.8.10' apply false
id 'com.google.protobuf' version '0.9.2' apply false
}
module build.grade
plugins {
id 'com.android.library'
id 'org.jetbrains.kotlin.android'
id 'com.google.protobuf'
}
android {
...
}
dependencies {
protobuf(rootProject.ext.protos.grpc)
implementation rootProject.ext.libs.grpc.kotlinStub
implementation rootProject.ext.libs.grpc.okHttp
implementation rootProject.ext.libs.grpc.protobuf
implementation rootProject.ext.libs.grpc.stub
implementation rootProject.ext.libs.protobuf.protobuf
testImplementation rootProject.ext.libs.junit
testImplementation rootProject.ext.libs.mockk
testImplementation rootProject.ext.libs.truth
}
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
sourceCompatibility = rootProject.ext.java
targetCompatibility = rootProject.ext.java
}
protobuf {
protoc { artifact = rootProject.ext.libs.protobuf.protoc }
plugins {
java { artifact = rootProject.ext.libs.grpc.protocJava }
grpc { artifact = rootProject.ext.libs.grpc.protocJava }
grpckt { artifact = rootProject.ext.libs.grpc.protocKotlin }
}
generateProtoTasks {
all().each {
it.plugins {
java { option 'lite' }
grpc { option 'lite' }
grpckt { option 'lite' }
}
it.builtins {
kotlin { option 'lite' }
}
}
}
}
The text was updated successfully, but these errors were encountered: