Releases: gabrielfeo/develocity-api-kotlin
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
0.16.0-beta
What's Changed
- Publish API interface test fixture by @gabrielfeo in #48
Internal changes and updates
- Fix API spec update workflow by @gabrielfeo in #41
- Bump gradle to v8.1.1 by @gabrielfeo in #43
- Bump com.squareup.okhttp3:okhttp from 4.10.0 to 4.11.0 by @dependabot in #44
- Bump org.jetbrains.kotlin.jvm from 1.8.20 to 1.8.21 by @dependabot in #47
- Bump coroutines from 1.6.4 to 1.7.0 by @dependabot in #51
Full Changelog: 0.15.0...0.16.0-beta
0.15.0
What's Changed
- Fix wildcards in Retrofit services and increase read timeout by @gabrielfeo in #40
Full Changelog: 0.14.0...0.15.0
0.14.0
What's Changed
- Cache build-cache-performance calls by @gabrielfeo in #18
Full Changelog: 0.13.0...0.14.0
0.13.0
What's Changed
- Fix README links by @gabrielfeo in #16
- Improve use in full Kotlin projects by @gabrielfeo in #17
Full Changelog: 0.12.0...0.13.0
0.12.0
What's Changed
- Skip dry runs in PRs based on diff by @gabrielfeo in #10
- Add missing tests by @gabrielfeo in #12
- Rename env var for API URL by @gabrielfeo in #13
- Bump tj-actions/changed-files from 24 to 35 by @dependabot in #11
- Update leftover URL references by @gabrielfeo in #14
- Check README links are alive by @gabrielfeo in #15
Full Changelog: 0.11.0...0.12.0
0.11.0
What's Changed
- Bump moshi-kotlin from 1.13.0 to 1.14.0 by @dependabot in #6
- Bump moshi from 1.13.0 to 1.14.0 by @dependabot in #5
- Fix API spec updater by @gabrielfeo in #7
- Remove version from build logic by @gabrielfeo in #8
Full Changelog: 0.10.0...0.11.0
0.10.0
Add source links in javadoc