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
We have a build consisting of cpp projects and some of those are jni shared libraries with the following build configuration:
release {
with(git) {
requireBranch.set("master")
failOnCommitNeeded.set(false)
commitVersionFileOnly.set(true)
tagTemplate.set(project.ext["release.tagTemplate"].toString())
preTagCommitMessage.set(project.ext["release.preTagCommitMessage"].toString())
newVersionCommitMessage.set(project.ext["release.newVersionCommitMessage"].toString())
}
}
val beforeReleaseBuild by tasks.getting
val afterReleaseBuild by tasks.getting
if (tasks.withType(Test::class).isNotEmpty()) {
beforeReleaseBuild.dependsOn(tasks.test)
}
afterReleaseBuild.dependsOn(tasks.publish)
library {
source.from("src/main/c++")
publicHeaders.from("src/main/include")
binaries.configureEach {
compileTask.get().compilerArgs.addAll(
listOf(
"-I", "${org.gradle.internal.jvm.Jvm.current().javaHome}/include",
"-I", "${org.gradle.internal.jvm.Jvm.current().javaHome}/include/linux"
)
)
}
}
Running gradle release on the jni project i got:
Failed to notify project evaluation listener.
> Failed to query the value of property 'compileTask'.
> Could not create task ':commons-io-jni-release:commons-io-jni:compileTestCpp'.
> Could not create task of type 'CppCompile'.
> Could not create service of type DefaultCompilationStateCacheFactory.
> Cache 'nativeCompile' couldn't be reused because of the following mismatch:
* Requested value serializer type (org.gradle.language.nativeplatform.internal.incremental.CompilationStateSerializer) doesn't match current cache type (org.gradle.language.nativeplatform.internal.incremental.CompilationStateSerializer)
> Failed to query the value of property 'compileTask'.
> Could not create task ':commons-io-jni-release:commons-io-jni:compileDebugCpp'.
> Could not create task of type 'CppCompile'.
> Could not create service of type DefaultCompilationStateCacheFactory.
> Cache 'nativeCompile' couldn't be reused because of the following mismatch:
* Requested value serializer type (org.gradle.language.nativeplatform.internal.incremental.CompilationStateSerializer) doesn't match current cache type (org.gradle.language.nativeplatform.internal.incremental.CompilationStateSerializer)
After this all projects in the build are affected by this issue unless native-build/.gradle cache is deleted and the build is reconfigured again.
The text was updated successfully, but these errors were encountered:
abelavusau
changed the title
Error releasing jni projects
Failure on releasing jni projects
Dec 5, 2023
We have a build consisting of cpp projects and some of those are jni shared libraries with the following build configuration:
Running
gradle release
on the jni project i got:After this all projects in the build are affected by this issue unless
native-build/.gradle
cache is deleted and the build is reconfigured again.The text was updated successfully, but these errors were encountered: