Skip to content

Add support for Gradle configuration cache to Gradle Artifactory plugin #601

Closed
@maxtracking

Description

@maxtracking

AGP 7.x introduced configuration cache: https://docs.gradle.org/7.3.2/userguide/configuration_cache.html#config_cache:intro
When I tried to enable it in my Android project like this in gradle.properties

org.gradle.unsafe.configuration-cache=true

...I've got the following errors after the simplest ./gradlew help:

* What went wrong:
Configuration cache problems found in this build.

71899 problems were found storing the configuration cache, only the first 4096 were considered, 34 of which seem unique.
- Plugin 'com.jfrog.artifactory': read system property 'awt.toolkit'
  See https://docs.gradle.org/7.3.2/userguide/configuration_cache.html#config_cache:requirements:undeclared_sys_prop_read
- Plugin 'com.jfrog.artifactory': read system property 'file.encoding'
  See https://docs.gradle.org/7.3.2/userguide/configuration_cache.html#config_cache:requirements:undeclared_sys_prop_read
- Plugin 'com.jfrog.artifactory': read system property 'ftp.nonProxyHosts'
  See https://docs.gradle.org/7.3.2/userguide/configuration_cache.html#config_cache:requirements:undeclared_sys_prop_read
- Plugin 'com.jfrog.artifactory': read system property 'gopherProxySet'
  See https://docs.gradle.org/7.3.2/userguide/configuration_cache.html#config_cache:requirements:undeclared_sys_prop_read
- Plugin 'com.jfrog.artifactory': read system property 'http.nonProxyHosts'
  See https://docs.gradle.org/7.3.2/userguide/configuration_cache.html#config_cache:requirements:undeclared_sys_prop_read
- Plugin 'com.jfrog.artifactory': read system property 'java.awt.graphicsenv'
  See https://docs.gradle.org/7.3.2/userguide/configuration_cache.html#config_cache:requirements:undeclared_sys_prop_read
- Plugin 'com.jfrog.artifactory': read system property 'java.awt.headless'
  See https://docs.gradle.org/7.3.2/userguide/configuration_cache.html#config_cache:requirements:undeclared_sys_prop_read
- Plugin 'com.jfrog.artifactory': read system property 'java.awt.printerjob'
  See https://docs.gradle.org/7.3.2/userguide/configuration_cache.html#config_cache:requirements:undeclared_sys_prop_read
- Plugin 'com.jfrog.artifactory': read system property 'java.io.tmpdir'
  See https://docs.gradle.org/7.3.2/userguide/configuration_cache.html#config_cache:requirements:undeclared_sys_prop_read
- Plugin 'com.jfrog.artifactory': read system property 'java.runtime.name'
  See https://docs.gradle.org/7.3.2/userguide/configuration_cache.html#config_cache:requirements:undeclared_sys_prop_read
- Plugin 'com.jfrog.artifactory': read system property 'java.vendor.url.bug'
  See https://docs.gradle.org/7.3.2/userguide/configuration_cache.html#config_cache:requirements:undeclared_sys_prop_read
- Plugin 'com.jfrog.artifactory': read system property 'java.vm.compressedOopsMode'
  See https://docs.gradle.org/7.3.2/userguide/configuration_cache.html#config_cache:requirements:undeclared_sys_prop_read
- Plugin 'com.jfrog.artifactory': read system property 'java.vm.info'
  See https://docs.gradle.org/7.3.2/userguide/configuration_cache.html#config_cache:requirements:undeclared_sys_prop_read
- Plugin 'com.jfrog.artifactory': read system property 'jdk.debug'
  See https://docs.gradle.org/7.3.2/userguide/configuration_cache.html#config_cache:requirements:undeclared_sys_prop_read
- Plugin 'com.jfrog.artifactory': read system property 'kotlin.daemon.jvm.options'
  See https://docs.gradle.org/7.3.2/userguide/configuration_cache.html#config_cache:requirements:undeclared_sys_prop_read
plus 19 more problems. Please see the report for details.

They all seem to be the same standard problem that could be fixed in the plugin thus making it supporting configuration cache (and making builds faster).

For the time being I can workaround it by simply treating these errors as warnings and setting insanely high limit on errors:

org.gradle.unsafe.configuration-cache-problems=warn
org.gradle.unsafe.configuration-cache.max-problems=72000

Ideally JFrog pluging implements all the necessary changes to provide such support.

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestSuggest an idea for this project

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions