Skip to content

Commit c930603

Browse files
chore: Add new EspressoBuildConfig options (#1687)
1 parent 5900077 commit c930603

File tree

1 file changed

+77
-0
lines changed

1 file changed

+77
-0
lines changed

src/main/java/io/appium/java_client/android/options/server/EspressoBuildConfig.java

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,83 @@ public Optional<String> getCompileSdkVersion() {
134134
return getToolsVersionsFieldValue("compileSdk");
135135
}
136136

137+
/**
138+
* Set the version of the included androidx.compose.ui components to compile the server for.
139+
* By default, the version from app's build.gradle is used.
140+
*
141+
* @param composeVersion E.g. "1.0.5"
142+
* @return self instance for chaining.
143+
*/
144+
public EspressoBuildConfig withComposeVersion(String composeVersion) {
145+
return assignToolsVersionsField("composeVersion", composeVersion);
146+
}
147+
148+
/**
149+
* Get the version of included androidx.compose.ui components.
150+
*
151+
* @return Version of androidx.compose.ui components.
152+
*/
153+
public Optional<String> getComposeVersion() {
154+
return getToolsVersionsFieldValue("composeVersion");
155+
}
156+
157+
/**
158+
* Set the minimum version of JVM the project sources are compatible with.
159+
*
160+
* @param sourceCompatibility E.g. "VERSION_12"
161+
* @return self instance for chaining.
162+
*/
163+
public EspressoBuildConfig withSourceCompatibility(String sourceCompatibility) {
164+
return assignToolsVersionsField("sourceCompatibility", sourceCompatibility);
165+
}
166+
167+
/**
168+
* Get the minimum version of JVM the project sources are compatible with.
169+
*
170+
* @return Minimum version of JVM the project sources are compatible with.
171+
*/
172+
public Optional<String> getSourceCompatibility() {
173+
return getToolsVersionsFieldValue("sourceCompatibility");
174+
}
175+
176+
/**
177+
* Set the target version of the generated JVM bytecode as a string.
178+
*
179+
* @param jvmTarget E.g. "1_10" or `1_8`
180+
* @return self instance for chaining.
181+
*/
182+
public EspressoBuildConfig withJvmTarget(String jvmTarget) {
183+
return assignToolsVersionsField("jvmTarget", jvmTarget);
184+
}
185+
186+
/**
187+
* Get the target version of the generated JVM bytecode as a string.
188+
*
189+
* @return Target version of the generated JVM bytecode as a string.
190+
*/
191+
public Optional<String> getJvmTarget() {
192+
return getToolsVersionsFieldValue("jvmTarget");
193+
}
194+
195+
/**
196+
* Set the target version of JVM the project sources are compatible with.
197+
*
198+
* @param targetCompatibility E.g. "VERSION_12"
199+
* @return self instance for chaining.
200+
*/
201+
public EspressoBuildConfig withTargetCompatibility(String targetCompatibility) {
202+
return assignToolsVersionsField("targetCompatibility", targetCompatibility);
203+
}
204+
205+
/**
206+
* Get the target version of JVM the project sources are compatible with.
207+
*
208+
* @return Target version of JVM the project sources are compatible with.
209+
*/
210+
public Optional<String> getTargetCompatibility() {
211+
return getToolsVersionsFieldValue("targetCompatibility");
212+
}
213+
137214
/**
138215
* Set the minimum Android SDK version to compile the server for.
139216
* By default, the version from the app build.gradle is used.

0 commit comments

Comments
 (0)