Skip to content

Commit 349f785

Browse files
authored
* fixed: robovm build fails if project uses configuration cache (#866)
while robovm plugin doesn't support caching it should not fail build of projects that configured with cache. steps to reproduce: > ./gradlew --configuration-cache launchIPhoneSimulator exception: ``` 1: Task failed with an exception. ----------- * What went wrong: Configuration cache state could not be cached: field `nakedExpressions` of `org.codehaus.plexus.interpolation.PrefixAwareRecursionInterceptor` bean found in field `recursionInterceptor` of `org.apache.maven.model.interpolation.StringSearchModelInterpolator` bean found in field `modelInterpolator` of `org.apache.maven.model.building.DefaultModelBuilder` bean found in field `modelBuilder` of `org.apache.maven.repository.internal.DefaultArtifactDescriptorReader` bean found in field `artifactDescriptorReader` of `org.sonatype.aether.impl.internal.DefaultRepositorySystem` bean found in field `repositorySystem` of task `:launchIPhoneSimulator` of type `org.robovm.gradle.tasks.IPhoneSimulatorTask`: error writing value of type 'java.util.Stack' > 'ObjectOutputStream.putFields' is not supported by the Gradle configuration cache. See https://docs.gradle.org/9.6.1/userguide/configuration_cache_status.html#config_cache:not_yet_implemented:java_serialization for details. 2: Task failed with an exception. ----------- * What went wrong: Configuration cache problems found in this build. 3 problems were found storing the configuration cache, 2 of which seem unique. - Task `:launchIPhoneSimulator` of type `org.robovm.gradle.tasks.IPhoneSimulatorTask`: cannot serialize object of type 'org.gradle.api.internal.project.DefaultProject', a subtype of 'org.gradle.api.Project', as these are not supported with the configuration cache. See https://docs.gradle.org/9.6.1/userguide/configuration_cache_requirements.html#config_cache:requirements:disallowed_types - Task `:launchIPhoneSimulator` of type `org.robovm.gradle.tasks.IPhoneSimulatorTask`: error writing value of type 'java.util.Stack' ```
1 parent 6723215 commit 349f785

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

plugins/gradle/src/main/java/org/robovm/gradle/tasks/AbstractRoboVMTask.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,16 @@ abstract public class AbstractRoboVMTask extends DefaultTask {
7979
protected Logger roboVMLogger;
8080

8181
public AbstractRoboVMTask() {
82+
try {
83+
// TODO: support configuration cache, disabling as will crash with message
84+
// Task `:launchIPhoneSimulator` of type `org.robovm.gradle.tasks.IPhoneSimulatorTask`:
85+
// cannot serialize object of type 'org.gradle.api.internal.project.DefaultProject',
86+
// a subtype of 'org.gradle.api.Project', as these are not supported with the configuration cache.
87+
notCompatibleWithConfigurationCache("Not compatible due internal implementation");
88+
} catch (NoSuchMethodError e) {
89+
// not available before Gradle 7.4
90+
}
91+
8292
project = getProject();
8393
extension = (RoboVMPluginExtension) project.getExtensions().getByName(RoboVMPluginExtension.NAME);
8494
repositorySystem = createRepositorySystem();

0 commit comments

Comments
 (0)