-
-
Notifications
You must be signed in to change notification settings - Fork 107
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
add google cloud storage support #284
Conversation
a84d0cd
to
50c2022
Compare
...src/main/kotlin/de/fayard/refreshVersions/core/internal/MavenDependencyVersionsFetcherGCS.kt
Outdated
Show resolved
Hide resolved
...src/main/kotlin/de/fayard/refreshVersions/core/internal/MavenDependencyVersionsFetcherGCS.kt
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@NikkyAI There's compilations error right now. I need them to be fixed in order to review the changes.
@NikkyAI Apart from that, I won't be able to help much, I'm moving to Paris this week-end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR breaks existing functionality: non existing files in a file repo (e.g. mavenLocal
) would get an HttpException
to be thrown with the 404 code via the OkHttp interceptor, but this change changes the types of the exceptions to be the raw ones (FileNotFoundException
). Consequently, I'll need to perform other changes or reachitect the changes.
EDIT: I saw the code getting the exception was catching FileNotFoundException
so it wasn't breaking it, but it was duplicating functionality.
Also using |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, answer the questions I asked, but don't push to the branch, I'll finish the work (already started changes).
...src/main/kotlin/de/fayard/refreshVersions/core/internal/MavenDependencyVersionsFetcherGCS.kt
Outdated
Show resolved
Hide resolved
...src/main/kotlin/de/fayard/refreshVersions/core/internal/MavenDependencyVersionsFetcherGCS.kt
Outdated
Show resolved
Hide resolved
...src/main/kotlin/de/fayard/refreshVersions/core/internal/MavenDependencyVersionsFetcherGCS.kt
Outdated
Show resolved
Hide resolved
...src/main/kotlin/de/fayard/refreshVersions/core/internal/MavenDependencyVersionsFetcherGCS.kt
Outdated
Show resolved
Hide resolved
...src/main/kotlin/de/fayard/refreshVersions/core/internal/MavenDependencyVersionsFetcherGCS.kt
Outdated
Show resolved
Hide resolved
...src/main/kotlin/de/fayard/refreshVersions/core/internal/MavenDependencyVersionsFetcherGCS.kt
Outdated
Show resolved
Hide resolved
...src/main/kotlin/de/fayard/refreshVersions/core/internal/MavenDependencyVersionsFetcherGCS.kt
Outdated
Show resolved
Hide resolved
...rc/main/kotlin/de/fayard/refreshVersions/core/internal/MavenDependencyVersionsFetcherFILE.kt
Outdated
Show resolved
Hide resolved
...c/main/kotlin/de/fayard/refreshVersions/core/internal/DependencyVersionsFetcher.Companion.kt
Outdated
Show resolved
Hide resolved
...c/main/kotlin/de/fayard/refreshVersions/core/internal/DependencyVersionsFetcher.Companion.kt
Outdated
Show resolved
Hide resolved
This adds support for mavenLocal, improves handling of various cases in Google Cloud Storage repos, and paves the way for future integrations.
I'm sorry Nikky, I know it's frustrating, we need to improve our release process. Hopefully we can have a development version released soon |
@jmfayard Maybe we can put the GCS support behind a flag (e.g. |
I'm fine with that |
well gcs is not even used without a gcs repo being configured.. so i would just print a warning when it is used for now |
@NikkyAI @LouisCAD we can now use jitpack to have dev versions published faster See #290 For this PR it would be configured this way in buildscript {
val githubPR: Int? = 284
repositories {
gradlePluginPortal()
if (githubPR != null) maven("https://jitpack.io")
}
val classpath = if (githubPR == null)
"de.fayard.refreshVersions:refreshVersions:0.9.7" else
"com.github.jmfayard:refreshVersions:PR${githubPR}-SNAPSHOT"
dependencies.classpath(classpath)
} |
this dependency on jitpack seems to work for me: |
a335035
to
9d862c7
Compare
@NikkyAI Why did you force-push a change instead of simply pushing a plain commit? |
i force pushed undid my changes, because i noticed i was still on the PR branch |
it currently seems to break android plugin because of dependencies |
@NikkyAI Shadowing dependencies has big implications when it comes to plugin size, and we want to avoid delaying ephemeral CIs (such as GitHub Actions) further for projects using refreshVersions for a feature that many projects will not need. There might be another way to avoid dependency version conflicts, we'll need to test it. FYI, I'll get back to this early next year. We will test something with another optional module, and if it works, we might use that same technique for this feature. |
Hello, just to let you know I added this PR into my priority list (currently number 3). I think we can have an extra module that brings GCS support, and a clever way to enabled it very easily, in a discoverable manner. I'll experiment with that soon. |
# Conflicts: # plugins/core/src/main/kotlin/de/fayard/refreshVersions/core/internal/CurrentlyUsedVersion.kt # plugins/versions.properties
@NikkyAI Please, can you give more details on the actual breakage, and the AGP version(s) you witnessed the issues with? |
Thanks for your help on Kotlin's Slack in reproducing this and finding a solution. I'm going to push the changes I made to avoid the issue from triggering. |
Without that, the Google Cloud Storage client library would make refreshVersions and projects using it use an "android" variant, which would then lead to runtime errors with the Android Gradle Plugin that relies on the "jre" variant and not the ont built to be embedded into an Android library or application.
Again, thank you very much @NikkyAI for your contribution, your patience and your help! I think GCS support is very good addition, especially considering the fact that Google is the most environment conscious and friendly companies of its scale in the cloud computing area, and it's been so for a long time (close to 2 decades back). I think GCS support in refreshVersions has the potential to be very helpful for teams, developers and companies that have private artifacts to store. |
fixes #283
rough first attempt, but it worksrefactored and also added support for
mavenLocal()
and otherfile:https://
based repos