diff --git a/.github/.cache_version b/.github/.cache_version index 36eef14295..7af44b6c60 100644 --- a/.github/.cache_version +++ b/.github/.cache_version @@ -1 +1 @@ -8.0.11 +9.1 \ No newline at end of file diff --git a/.github/actions/cache/action.yml b/.github/actions/cache/action.yml index 2ab9fd6d2f..638613b27d 100644 --- a/.github/actions/cache/action.yml +++ b/.github/actions/cache/action.yml @@ -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/**' )}} diff --git a/config/generation.config.js b/config/generation.config.js index a8e813ff72..a3e0ebac10 100644 --- a/config/generation.config.js +++ b/config/generation.config.js @@ -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/*', diff --git a/generators/src/main/java/com/algolia/codegen/AlgoliaJavaGenerator.java b/generators/src/main/java/com/algolia/codegen/AlgoliaJavaGenerator.java index 4831df2527..b11b5bdefa 100644 --- a/generators/src/main/java/com/algolia/codegen/AlgoliaJavaGenerator.java +++ b/generators/src/main/java/com/algolia/codegen/AlgoliaJavaGenerator.java @@ -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") ); } diff --git a/templates/java/gitignore.mustache b/templates/java/gitignore.mustache deleted file mode 100644 index ca4ac1f99c..0000000000 --- a/templates/java/gitignore.mustache +++ /dev/null @@ -1,19 +0,0 @@ -*.class - -# Mobile Tools for Java (J2ME) -.mtj.tmp/ - -# Package Files # -*.war -*.ear - -# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml -hs_err_pid* - -# build files -**/target -target -.gradle -build - -.openapi-generator