remove ilo run command file
[yosql.git] / yosql-website / content / configuration / java / apiVersion.md
blob85712301560a2b2645ede046d19046c1c05afe9c
1 ---
2 title: apiVersion
3 date: 2019-09-27T18:51:08+02:00
4 menu:
5   main:
6     parent: Java
7 categories:
8   - Configuration
9 tags:
10   - Java
11   - api
12 ---
14 The `apiVersion` configuration controls which Java JDK API level should be targeted.
16 ## Configuration Options
18 ### Option: '16'
20 The default value of the `apiVersion` configuration option is `16`. It is updated alongside the minimum Java version required by `YoSQL`.
22 ### Option: '11'
24 Changing the `apiVersion` configuration option to `11` will allow generated code to use Java APIs up until version 11 (including).
26 ## Related Options
28 - [useDiamondOperator](../usediamondoperator/): Controls whether the diamond operator is used in generated code.
29 - [useFinal](../usefinal/): Controls whether parameters and variables are declared `final`.
30 - [useGenerics](../usegenerics/): Controls whether generic type parameters are used in generated code.
31 - [useRecords](../userecords/): Controls whether records are used in generated code.
32 - [useStreamApi](../usestreamapi/): Controls whether stream API is used in generated code.
33 - [useTextBlocks](../usetextblocks/): Controls whether text blocks are used in generated code.
34 - [useVar](../usevar/): Controls whether the `var` keyword is used in generated code.
36 ## Tooling
38 ### Maven
40 In order to use `YoSQL` together with [Maven](https://maven.apache.org/), take a look at the tooling [documentation for Maven](/tooling/maven/).
42 {{< maven/config/java/apiVersion >}}
44 ### Gradle
46 In order to use `YoSQL` together with [Gradle](https://gradle.org/), take a look at the tooling [documentation for Gradle](/tooling/gradle/).
48 ```kotlin
49 plugins {
50   java
51   id("wtf.metio.yosql") version "2021.4.21"
54 yosql {
55   java {
56     apiVersion.set(17)
57   }
59 ```
61 ```groovy
62 plugins {
63   id "java"
64   id "wtf.metio.yosql" version "2021.4.21"
67 yosql {
68   java {
69     apiVersion = 17
70   }
72 ```
74 ### Bazel
76 In order to use `YoSQL` together with [Bazel](https://bazel.build/), take a look at the tooling [documentation for Bazel](/tooling/bazel/).
78 ### CLI
80 In order to use YoSQL on the command line, take a look at the tooling [documentation for CLI](/tooling/cli/).
82 ```shell
83 $ yosql --java-api-version=17
84 ```
86 The shorter form is available as well:
88 ```shell
89 $ yosql --api-version=17
90 ```