Comments (6)
Sure. Judging from the comment above the linked line, the offending method call should be removed and then the unit tests should be fixed. I would guess the ideal fix would let the test use the lazy provider construction properly and/or fix a timing issue. If you have any other thoughts on the form of the desired fix, please let me know.
from axion-release-plugin.
It probably concerns this line:
For ease of use, the gradle link from the warning message:
from axion-release-plugin.
hi! @adenhartog want to try and fix it?:)
from axion-release-plugin.
When removing the offending method call one example of the failing tests is RepositoryConfigFactoryTest
with java.lang.IllegalStateException: Cannot obtain value from provider of Gradle property 'release.customKeyPassword' at configuration time. Use a provider returned by 'forUseAtConfigurationTime()' instead
The errormessage is a little different but it appears to be related to: gradle/gradle#17638 which has not been fixed yet. Essentially, the test is trying to do something that is not supported by the Gradle ProjectBuilder yet.
I have tried to manipulate the project to be in the executed state but that doesn't work:
- ((ProjectInternal) project).evaluate()
- ((ProjectInternal) project).state.configured()
Since the relevant Extension in test is created by the Gradle Project (project.objects.newInstance(RepositoryConfig, ...)
) it is difficult to inject a spy or mock. I don't see an easy fix. The relevant testcases could be moved to an integrationtest, but that seems like a lot of work to check a property.convention(providers.gradleProperty(...))
construction. Another option is to request that Gradle issue 17638 is resolved no later than the Gradle 9 release, but it currently does not seem to be high on the priorities list at Gradle. What do you think? Any other ideas?
from axion-release-plugin.
Another option would be to not have a convention based on a Gradle property at all. This would mean the user would have to set the property in a buildscript extension and not in the gradle.properties file, or could set the extension property with their own Gradle property. For commandline arguments that are specific to certain tasks, task options could be used instead of Gradle properties. I haven't looked deeply into it, but on the surface it seems the RepositoryConfig
properties could also be ReleaseTask
/PushReleaseTask
options.
from axion-release-plugin.
If there isn't a viable path to fixing this test in the short term, I'd humbly suggest disabling it, and releasing a version that does not produce warnings. For those of us that try to keep our builds warning-free, this is a major annoyance. Once you have one warning, it's easy for additional ones to creep in unnoticed.
from axion-release-plugin.
Related Issues (20)
- Issue on creating new tag in gradle, local machine and github action HOT 5
- How to check if current version is a snapshot programatically HOT 1
- RemoteRefUpdate Status is not populated to exception logger HOT 2
- -Prelease.forceVersion is not working locally HOT 3
- Disable Root Project From triggering Tag or Release HOT 2
- Handling Versioning in Multi-Module Gradle Projects with Axion-Release Plugin HOT 3
- initialPreReleaseIfNotOnPrerelease on gradle command line?
- Incrementing minor release during prerelease?
- Issues using the Kotlin DSL
- Issue with Tasks Not Found in Subproject in Multi-Project Setup HOT 2
- Question - How to serialize / deserialize tag in 1.16.1?
- Build fails because implicit dependency of VerifyReleaseTask HOT 4
- ReleaseFailedException on concurrent attempts to increment version
- Gradle 8.6 configuration cache compatibility?
- On GitHub Actions an error on creating a jgit lock file appears
- Cannot push changes in GitHub Actions with custom user name and password
- Git repository added as submodules do not work HOT 1
- Retrieving the version for large repositories is slow HOT 2
- Doesn't work when git is configured to gpg.format=ssh HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from axion-release-plugin.