Skip to content

Commit

Permalink
fix(java): cache common files (#427)
Browse files Browse the repository at this point in the history
  • Loading branch information
millotp authored Apr 27, 2022
1 parent acca4d2 commit cdafe8b
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 25 deletions.
2 changes: 1 addition & 1 deletion .github/.cache_version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8.0.11
9.1
9 changes: 5 additions & 4 deletions .github/actions/cache/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -381,15 +381,16 @@ runs:
)}}
# Restore Java clients: used during 'cts' or 'codegen'
- name: Restore Java client gradle properties
- name: Restore Java client gradle files
if: ${{ inputs.job == 'cts' || inputs.job == 'codegen' || (inputs.job == 'client' && inputs.language == 'java') }}
uses: actions/cache@v2
with:
path: clients/algoliasearch-client-java-2/gradle.properties
path: |
clients/algoliasearch-client-java-2/gradle*
clients/algoliasearch-client-java-2/gradle/*
key: |
${{ env.CACHE_VERSION }}-${{
${{ env.CACHE_VERSION }}-java-common-${{
hashFiles(
'specs/bundled/search.yml',
'templates/java/**',
'generators/src/**'
)}}
Expand Down
1 change: 1 addition & 0 deletions config/generation.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ module.exports = {

// Java
'!clients/algoliasearch-client-java-2/*.gradle',
'!clients/algoliasearch-client-java-2/.gitignore',
'!clients/algoliasearch-client-java-2/algoliasearch-core/build.gradle',
'!clients/algoliasearch-client-java-2/algoliasearch-core/src/com/algolia/exceptions/*',
'!clients/algoliasearch-client-java-2/algoliasearch-core/src/com/algolia/utils/*',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,8 @@ public void processOpts() {

supportingFiles.removeIf(file ->
file.getTemplateFile().equals("build.gradle.mustache") ||
file.getTemplateFile().equals("settings.gradle.mustache")
file.getTemplateFile().equals("settings.gradle.mustache") ||
file.getTemplateFile().equals("gitignore.mustache")
);
}

Expand Down
19 changes: 0 additions & 19 deletions templates/java/gitignore.mustache

This file was deleted.

0 comments on commit cdafe8b

Please sign in to comment.