Skip to content

Commit 0e79784

Browse files
committed
use testClasses
1 parent bdec58b commit 0e79784

File tree

6 files changed

+10
-16
lines changed

6 files changed

+10
-16
lines changed

clients/algoliasearch-client-java/algoliasearch/build.gradle

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,6 @@ repositories {
88
mavenCentral()
99
}
1010

11-
java {
12-
sourceCompatibility = JavaVersion.VERSION_1_8
13-
targetCompatibility = JavaVersion.VERSION_1_8
14-
}
15-
1611
dependencies {
1712
implementation 'com.google.code.findbugs:jsr305:3.0.2'
1813
api 'com.squareup.okhttp3:okhttp:4.11.0'
@@ -23,9 +18,10 @@ dependencies {
2318
implementation 'org.openapitools:jackson-databind-nullable:0.2.6'
2419
}
2520

26-
tasks.withType(JavaCompile) {
21+
tasks.withType(JavaCompile).configureEach {
2722
options.encoding = 'UTF-8'
2823
options.compilerArgs += ['-Xlint:deprecation', '-Xlint:unchecked', '-Xlint:cast', '-Xlint:rawtypes']
24+
options.release = 8
2925
}
3026

3127
javadoc {

config/clients.config.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,8 @@
131131
"supportedVersions": [
132132
"8",
133133
"11",
134-
"21",
135-
"17"
134+
"17",
135+
"21"
136136
]
137137
},
138138
"javascript": {
1.83 KB
Binary file not shown.

scripts/buildLanguages.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,8 @@ async function buildLanguage(language: Language, gens: Generator[], buildType: B
6868
case 'java':
6969
case 'kotlin':
7070
// the playground specify search but it will still build everything
71-
await run(
72-
`./gradle/gradlew -p ${cwd} ${buildType === 'client' || buildType === 'playground' ? 'assemble -Pclient=Search' : 'build'}`,
73-
{ language },
74-
);
71+
const isTestClass = buildType === 'guides' || buildType === 'snippets';
72+
await run(`./gradle/gradlew -p ${cwd} ${isTestClass ? 'testClasses' : 'assemble'}`, { language });
7573
break;
7674
case 'php':
7775
// await runComposerInstall();

templates/java/snippets/build.mustache

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ dependencies {
1212

1313
java {
1414
toolchain {
15-
languageVersion = JavaLanguageVersion.of(17)
16-
vendor = JvmVendorSpec.ADOPTIUM
15+
languageVersion = JavaLanguageVersion.of({{languageVersion}})
16+
vendor = JvmVendorSpec.AZUL
1717
}
1818
}
1919

templates/java/tests/build.mustache

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ repositories {
99
java {
1010
toolchain {
1111
languageVersion = JavaLanguageVersion.of({{languageVersion}})
12-
vendor = JvmVendorSpec.ADOPTIUM
12+
vendor = JvmVendorSpec.AZUL
1313
}
1414
}
1515

@@ -33,4 +33,4 @@ test() {
3333
events "passed", "skipped", "failed"
3434
showStandardStreams = true
3535
}
36-
}
36+
}

0 commit comments

Comments
 (0)