-
Notifications
You must be signed in to change notification settings - Fork 3
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
TaskCreationException because of DefaultSelfResolvingDependency with Gradle 8.7+ #12
Comments
Hi @G00fY2, Indeed, at the moment, the plugin does not support newer Gradle versions, we are working on fixing this. I will keep this issue open and can ping you one a new version is released. |
Any update on this? It is now our only blocker in the pipeline. |
@ArcherEmiya05 unfortunately not. As this is a bigger refactor, it might take a bit until it is finished. |
Will it take months to finish cause we are now considering removing the plugin for now? |
Unfortunately I do not know an exact ETA yet, but it will definitely take a bit. Currently the options are downgrading Gradle (might not work in your project), or using the CLI for CI integration (Help Article HowTo). |
Yes, I hope we can use your CLI as temporary replacement instead of gradle plugin for CI/CD pipeline so that incompatibility with Gradle will no longer be a problem. |
@titze Does this command Below is the setup we will have on the pipeline.
|
The commands are not quite equivalent, there are two things missing (at the moment) if you use the CLI like you do:
Did you find this helpful in AppSweep that we showed in which library / your code an issue was? Re download URL: |
Just thought it would be a good feature to be able to accept url. Anyway it seems that the plugin is still better approach than the CLI, really hope it get fixed for newer Gradle version. We do in fact use R8 in our code and AppSweep taking extra miles to check the used libraries is good as well. |
I will keep you in the loop! If the CLI would also offer the same functionality (mappingfile, libraries), would that be a problem for you? Integration with Gradle is always a bit tricky, so not relying on it (much) might make integration a lot smoother. |
Just being able to include the mapping file would probably enough reason for us to permanently decommission the plugin in favor of CLI approach. |
Ok, thanks for that info! I will ping you when I know more. |
@ArcherEmiya05 Keep in mind that then the library information is deduced from the app itself, and is not as accurate as if you uploaded via thge Gradle plugin. That part is currently not possible (yet) with the CLI. |
Are there any updates on that? We also updated our Gradle version. |
Have you tried our cli tool? https://help.guardsquare.com/en/articles/161270-using-the-guardsquare-cli Currently there is no update for the Gradle plugin unfortunately. |
Just in case this maybe helps some of you, this is how our Jenkins step looks: def APPSWEEP_SCAN_MESSAGE = 'AppSweep scan not executed or failed'
stage('AppSweep upload') {
when {
expression { return isReleaseOrHotfixBranch() }
}
steps {
echo '# Upload AAB to AppSweep'
script {
FAILED_STAGE = env.STAGE_NAME
}
script {
String releaseAAB = sh(
script: "find ./app/build/outputs/bundle/release/*.aab",
returnStdout: true
).trim()
String downloadUrl = "https://platform.guardsquare.com/cli/latest_linux_amd64"
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
sh "mkdir -p \"$HOME/.guardsquare\""
sh "curl --retry 2 --fail --show-error --silent --location $downloadUrl | tar -xvz -C \"$HOME/.guardsquare\""
APPSWEEP_SCAN_MESSAGE = sh(
script: "$HOME/.guardsquare/guardsquare scan \"$releaseAAB\" --tag \"CI\"",
returnStdout: true
).trim()
}
}
}
} The This way we don't need the AppSweep plugin at all. |
Yes, I switched to the command line. That one is working (at least on my machine / in my Docker container). |
Hi, are we any closer to resolving this as we've just upgraded our Gradle to 8.7 as well and had this error. |
The plugin is currently not compatible with Gradle 8.7+ because it uses internal Gradle APIs that are not available anymore:
appsweep-gradle/src/main/kotlin/com/guardsquare/appsweep/gradle/AppSweepPlugin.kt
Line 435 in 9517368
DefaultSelfResolvingDependency
was replaced withDefaultFileCollectionDependency
in Gradle 8.7 with this commit: gradle/gradle@a5bd459Therefore the appsweep plugin fails at configuration with the following stacktrace:
The text was updated successfully, but these errors were encountered: