-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Execution optimizations have been disabled" Warning on Gradle >= 7 #103
Comments
@Internal
public File getWorkingDir() {
return workingDir;
}
public void setWorkingDir(File workingDir) {
this.workingDir = workingDir;
}
@InputDirectory
@Optional
public File getInputGitDirectory() {
if (workingDir != null) {
File dotGitDirectory = new File(workingDir, ".git");
if (dotGitDirectory.isDirectory()) {
return dotGitDirectory;
}
}
return null;
} Works as a workaround which allows not changing the existing API, but I don't like it. It's probably best if it doesn't take the root project directory as an input property at all? In my custom changelog task I take just the relevant git refs folder: @InputDirectory
@PathSensitive(PathSensitivity.RELATIVE)
public abstract DirectoryProperty getGitRefs();
... { getGitRefs().convention(objectFactory.directoryProperty().fileValue(new File(".git/refs/"))); } |
|
I needed to add this to my build for it to work on Gradle 8: tasks.generateChangelog {
// ...
doNotTrackState("GenerateChangelogTask incorrectly depends on entire working dir, see https://github.com/shipkit/shipkit-changelog/issues/103")
dependsOn(tasks.assemble) // Same as above
} Otherwise, the build fails with one of two exceptions:
|
Mockito master is now broken because of this too... cc @TimvdLippe https://github.com/mockito/mockito/actions/runs/5457593285/jobs/9931914322 I'll try the workaround mentioned above to keep releasing now that the build is on Gradle 8.x. @shipkit please merge the PR associated here. |
@mockitoguy can you please take a look? |
It's not enough to just depend on // GenerateChangelogTask uses the entire repo as input, which means it needs to "depend on" all other tasks' outputs.
mustRunAfter(allprojects.collectMany { it.tasks }.grep { it.path != ":generateChangelog" && it.path != ":githubRelease" }) This also has a very sad side effect of realizing every task, luckily the mockito repo is not migrated to be lazy configured yet. |
* Fix test framework dependencies. > Task :extTest:test The automatic loading of test framework implementation dependencies has been deprecated. This is scheduled to be removed in Gradle 9.0. Declare the desired test framework directly on the test suite or explicitly declare the test framework implementation dependencies on the test's runtime classpath. Consult the upgrading guide for further information: https://docs.gradle.org/8.2/userguide/upgrading_version_8.html#test_framework_implementation_dependencies * Work around shipkit/shipkit-changelog#103
Looking. Thanks everyone! |
Reverts part of mockito#3053
An example of the warnings:
And the full log: https://github.com/magneticflux-/jetpack-compose-optics/runs/2769627239#step:5:38
Maybe only the
.git
folder should be provided as input?The text was updated successfully, but these errors were encountered: