Fix: Always set jakarta_annotation_version (#12834)

Commit 1735ab9d27 added changes to set the `jakarta_annotation_version`.

I've recently noticed that when using retrofit2 library, the project builds fine with Maven but fails with Gradle.

The build fails due to `Could not get unknown property 'jakarta_annotation_version' for object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler`.

Digging into this, in the generated `build.gradle` the `jakarta_annotation_version` is never set.
Upon closer inspection, aforementioned commit seems to indeed set it differently for the Maven build configuration than the Gradle build configuration (same for SBT configuration) for that matter.

The issue is that due to human error the `jakarta_annotation_version` line is added within the `{{#usePlayWS}}` block, meaning it won't be generated when `usePlayWS` is false, even though it should.

This commit changes this to always generate it.
This commit is contained in:
Edward Poot
2022-07-13 05:05:35 +02:00
committed by GitHub
parent 60c5875091
commit 8025aa3bfa
5 changed files with 5 additions and 2 deletions

View File

@@ -105,9 +105,9 @@ ext {
{{#openApiNullable}}
jackson_databind_nullable_version = "0.2.3"
{{/openApiNullable}}
jakarta_annotation_version = "1.3.5"
play_version = "2.6.7"
{{/usePlayWS}}
jakarta_annotation_version = "1.3.5"
swagger_annotations_version = "1.5.22"
junit_version = "4.13.2"
{{#useRxJava2}}

View File

@@ -102,8 +102,8 @@ ext {
jackson_version = "2.12.1"
jackson_databind_version = "2.12.6.1"
jackson_databind_nullable_version = "0.2.3"
jakarta_annotation_version = "1.3.5"
play_version = "2.6.7"
jakarta_annotation_version = "1.3.5"
swagger_annotations_version = "1.5.22"
junit_version = "4.13.2"
json_fire_version = "1.8.0"

View File

@@ -99,6 +99,7 @@ if(hasProperty('target') && target == 'android') {
ext {
oltu_version = "1.0.1"
retrofit_version = "2.3.0"
jakarta_annotation_version = "1.3.5"
swagger_annotations_version = "1.5.22"
junit_version = "4.13.2"
json_fire_version = "1.8.0"

View File

@@ -99,6 +99,7 @@ if(hasProperty('target') && target == 'android') {
ext {
oltu_version = "1.0.1"
retrofit_version = "2.3.0"
jakarta_annotation_version = "1.3.5"
swagger_annotations_version = "1.5.22"
junit_version = "4.13.2"
rx_java_version = "2.1.1"

View File

@@ -99,6 +99,7 @@ if(hasProperty('target') && target == 'android') {
ext {
oltu_version = "1.0.1"
retrofit_version = "2.3.0"
jakarta_annotation_version = "1.3.5"
swagger_annotations_version = "1.5.22"
junit_version = "4.13.2"
rx_java_version = "3.0.4"