Skip to content
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

Rename public.api to released.api #15

Merged
merged 1 commit into from
Dec 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/check_for_api_changes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ jobs:
distribution: temurin
cache: gradle

- name: Update public.api
- name: Update released.api
run: |
./gradlew updateApi --no-daemon

- name: Save public.api from master
run: mv generativeai/public.api ~/public.api
- name: Save released.api from master
run: mv generativeai/released.api ~/released.api

- name: Checkout branch
uses: actions/[email protected]
Expand All @@ -36,7 +36,7 @@ jobs:
cache: gradle

- name: Copy saved api to branch
run: mv ~/public.api generativeai/public.api
run: mv ~/released.api generativeai/released.api

- name: Run api warning task
run: |
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions plugins/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ The APIPlugin registers the two following tasks to facilitate this process:
- [buildApi](./src/main/java/com/google/gradle/plugins/ApiPlugin.kt) -> Creates a `.api` file
containing the public API of the project.
- [updateApi](./src/main/java/com/google/gradle/plugins/ApiPlugin.kt) -> Updates (or creates) the
`public.api` file at the project directory; keeping track of the currently released/public api.
`released.api` file at the project directory; keeping track of the currently released/public api.

### Tasks

The ChangelogPlugin registers the four following tasks:

- [findChanges](./src/main/java/com/google/gradle/tasks/FindChangesTask.kt) -> Creates a new `.api`
file for the current project, and compares it to the existing `public.api` to create a diff of
file for the current project, and compares it to the existing `released.api` to create a diff of
changes made to the public api.
- [makeChange](./src/main/java/com/google/gradle/tasks/MakeChangeTask.kt) -> Creates a new `.json`
file in the `.changes` directory with an optional message, including the version impact inferred
Expand Down
6 changes: 3 additions & 3 deletions plugins/src/main/java/com/google/gradle/plugins/ApiPlugin.kt
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ import org.gradle.kotlin.dsl.register
/**
* A Gradle plugin for creating `.api` files; representing the public API of the project.
*
* By default, a `public.api` file (at the root of the project) will be used as a base for the
* By default, a `released.api` file (at the root of the project) will be used as a base for the
* released api.
*
* Registers two tasks:
* - `buildApi` -> creates a `.api` file containing the *current* public API of the project.
* - `updateApi` -> updates the `public.api` file at the project root to match the one generated by
* - `updateApi` -> updates the `released.api` file at the project root to match the one generated by
* `buildApi`; effectively saying that the released api is up to date with the current repo state.
*
* @see ApiPluginExtension
Expand Down Expand Up @@ -73,7 +73,7 @@ abstract class ApiPlugin : Plugin<Project> {

context(Project)
private fun ApiPluginExtension.commonConfiguration() {
apiFile.convention(file("public.api"))
apiFile.convention(file("released.api"))
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import org.gradle.api.tasks.TaskAction
* The changes are represented as [LinesChanged]; with a list of added and removed lines between the
* files. These are saved in `.json` format in the [outputFile].
*
* @property old the previously released api file (typically `public.api)
* @property old the previously released api file (typically `released.api)
* @property new the current API pending release (generated from the state of the repo as is)
* @property outputFile where to save the diff to
*/
Expand Down
Loading