Releases: gabrielfeo/develocity-api-kotlin
2023.4.0-alpha01
Generated from the API spec of Gradle Enterprise API 2023.4.
What's Changed
New API spec
Library changes
There were no library API changes (other than the generated API).
Full Changelog: 2023.3.1...2023.4.0-alpha01
2023.3.1
This is a patch release. Fixes an issue that caused BuildsApi.getBuildsFlow
to yield incorrect results when using an advanced query, e.g. buildsApi.getBuildsFlow(since = lastWeek, query = "tag:local")
.
What's Changed
- Fix paging requests when using advanced query by @gabrielfeo in #134
Full Changelog: 2023.3.0...2023.3.1
2023.3.0
Generated from the API spec of Gradle Enterprise API 2023.3.
What's Changed
New API spec
Library changes
- Support advanced query in
BuildsApi
extensions by @gabrielfeo in #126
Full Changelog: 2023.2.0...2023.3.0
2023.2.0
Generated from the API spec of Gradle Enterprise API 2023.2.
What's Changed
Compared to 2023.1.0, the library API itself is unchanged, but the new generated code may contain breaking changes.
Full Changelog: 2023.1.0...2023.2.0
2023.1.0
Generated from the API spec of Gradle Enterprise API 2023.1.
First stable version. Compared to 0.17.0, the library API itself is unchanged, but the code generated from the new API spec may contain breaking changes. Library v0.17.0 was generated from GE API spec 2022.4, while v2023.1.0 is generated from 2023.1 (for API diff, see #42).
Versions will now be aligned with GE API releases, with the patch number added for potential library fixes (e.g. 2023.1 + .0).
Full Changelog: 0.17.0...2023.1.0
0.17.0
What's Changed
To further simplify the library API, static/companion methods of GradleEnterpriseApi
are removed. To migrate, simply create your own instance of the object:
-GradleEnterpriseApi.buildsApi.getBuilds(...)
+val api = GradleEnterpriseApi.newInstance()
+api.buildsApi.getBuilds(...)
- Remove DefaultInstance by @gabrielfeo in #86
Full Changelog: 0.16.2...0.17.0
0.16.2
What's Changed
This release fixes an issue that would cause pure code configuration (without required environment variables) to fail.
- Fix configuration via code by @gabrielfeo in #78
Full Changelog: 0.16.1...0.16.2
0.16.1
What's Changed
This release fixes an issue of 0.16.0 in which the internal OkHttpClient was eagerly initialized and threw requiring a token. This isn't the intended behavior because when used on internal CLI projects, some CLI users may not have a token on their machine.
- Don't fail eagerly from missing token by @gabrielfeo in #73
Full Changelog: 0.16.0...0.16.1
0.16.0
What's Changed
These are breaking changes, but easy to migrate. Please note the library is still pre-release, as 0.x
suggests.
API redesign
Below are examples of how to adapt to the new API. Refer to the latest README and javadoc.
Imports and API calls
-gradleEnterpriseApi.getBuilds(...)
+GradleEnterpriseApi.buildsApi.getBuilds(...)
-gradleEnterpriseApi.createOrUpdateBuildCacheNode(...)
+GradleEnterpriseApi.buildCacheApi.createOrUpdateBuildCacheNode(...)
-import com.gabrielfeo.gradle.enterprise.api.getBuildsFlow
-gradleEnterpriseApi.getBuildsFlow(...)
+import com.gabrielfeo.gradle.enterprise.api.extension.getBuildsFlow
+GradleEnterpriseApi.buildsApi.getBuildsFlow(...)
-import com.gabrielfeo.gradle.enterprise.api.model.get
-import com.gabrielfeo.gradle.enterprise.api.model.contains
+import com.gabrielfeo.gradle.enterprise.api.extension.get
+import com.gabrielfeo.gradle.enterprise.api.extension.contains
"LOCAL" in gradleAttributes.tags
gradleAttributes.propertyValues["Git commit id"]
Shutdown
-shutdown()
+GradleEnterpriseApi.shutdown()
Configuration via code
-options.cache.cacheEnabled = true
-gradleEnterpriseApi.getBuilds(...)
+val config = Config(cacheConfig = CacheConfig(cacheEnabled = true))
+val api = GradleEnterpriseApi.newInstance(config)
+api.buildsApi.getBuilds(...)
Default HTTP cache dir
The default HTTP cache dir is changed from ${java.io.tmpdir}/gradle-enterprise-api-kotlin-cache
to ${user.home}/.gradle-enterprise-api-kotlin-cache`. If you were using the default path and want to keep the old cache contents, you may simply move it to the new location.
# Print the current java.io.tmpdir path
echo 'System.out.println("\n" + System.getProperty("java.io.tmpdir"))' | jshell --feedback concise
# Move it to the new location
mv "<old-tmpdir>/gradle-enterprise-api-kotlin-cache" "$HOME/.gradle-enterprise-api-kotlin-cache"
For motivations, see the original PRs:
- Redesign API for better usage in projects by @gabrielfeo in #49
- Improve javadoc and rename withOptions by @gabrielfeo in #67
- Rename Options to Config by @gabrielfeo in #68
- Share clientBuilder between Config constructor calls by @gabrielfeo in #70
- Use a stable path for default HTTP cache dir by @gabrielfeo in #71
Full Changelog: 0.15.1...0.16.0
0.15.1
What's Changed
- Fix token reading in Linux by @gabrielfeo in #56
- Bump org.jetbrains.kotlin.jvm from 1.8.20 to 1.8.21 by @dependabot in #47
Full Changelog: 0.15.0...0.15.1