Class EspressoBuildConfig

    • Field Detail

      • ADDITIONAL_APP_DEPENDENCIES

        public static final java.lang.String ADDITIONAL_APP_DEPENDENCIES
        See Also:
        Constant Field Values
      • ADDITIONAL_ANDROID_TEST_DEPENDENCIES

        public static final java.lang.String ADDITIONAL_ANDROID_TEST_DEPENDENCIES
        See Also:
        Constant Field Values
    • Constructor Detail

      • EspressoBuildConfig

        public EspressoBuildConfig()
      • EspressoBuildConfig

        public EspressoBuildConfig​(java.lang.String json)
    • Method Detail

      • withGradleVersion

        public EspressoBuildConfig withGradleVersion​(java.lang.String version)
        Set Gradle version. By default, the version from the build.gradle is used.
        Parameters:
        version - E.g. "6.3".
        Returns:
        self instance for chaining.
      • getGradleVersion

        public java.util.Optional<java.lang.String> getGradleVersion()
        Get Gradle version.
        Returns:
        Gradle version.
      • withAndroidGradlePluginVersion

        public EspressoBuildConfig withAndroidGradlePluginVersion​(java.lang.String version)
        Set Gradle plugin version. It must correspond to the Gradle version (if provided). By default, the version from the build.gradle is used.
        Parameters:
        version - E.g. "4.1.1"
        Returns:
        self instance for chaining.
      • getAndroidGradlePluginVersion

        public java.util.Optional<java.lang.String> getAndroidGradlePluginVersion()
        Get Gradle plugin version.
        Returns:
        Gradle plugin version.
      • withBuildToolsVersion

        public EspressoBuildConfig withBuildToolsVersion​(java.lang.String version)
        Set Android build tools version to compile the server with. By default, the version from the build.gradle is used.
        Parameters:
        version - E.g. "28.0.3".
        Returns:
        self instance for chaining.
      • getBuildToolsVersion

        public java.util.Optional<java.lang.String> getBuildToolsVersion()
        Get Android build tools version.
        Returns:
        Android build tools version.
      • withCompileSdkVersion

        public EspressoBuildConfig withCompileSdkVersion​(java.lang.String version)
        Set Android SDK version to compile the server for. By default, the version from the app build.gradle is used.
        Parameters:
        version - E.g. "28"
        Returns:
        self instance for chaining.
      • getCompileSdkVersion

        public java.util.Optional<java.lang.String> getCompileSdkVersion()
        Get the target Android SDK version.
        Returns:
        Android SDK version.
      • withComposeVersion

        public EspressoBuildConfig withComposeVersion​(java.lang.String composeVersion)
        Set the version of the included androidx.compose.ui components to compile the server for. By default, the version from app's build.gradle is used.
        Parameters:
        composeVersion - E.g. "1.0.5"
        Returns:
        self instance for chaining.
      • getComposeVersion

        public java.util.Optional<java.lang.String> getComposeVersion()
        Get the version of included androidx.compose.ui components.
        Returns:
        Version of androidx.compose.ui components.
      • withSourceCompatibility

        public EspressoBuildConfig withSourceCompatibility​(java.lang.String sourceCompatibility)
        Set the minimum version of JVM the project sources are compatible with.
        Parameters:
        sourceCompatibility - E.g. "VERSION_12"
        Returns:
        self instance for chaining.
      • getSourceCompatibility

        public java.util.Optional<java.lang.String> getSourceCompatibility()
        Get the minimum version of JVM the project sources are compatible with.
        Returns:
        Minimum version of JVM the project sources are compatible with.
      • withJvmTarget

        public EspressoBuildConfig withJvmTarget​(java.lang.String jvmTarget)
        Set the target version of the generated JVM bytecode as a string.
        Parameters:
        jvmTarget - E.g. "1_10" or `1_8`
        Returns:
        self instance for chaining.
      • getJvmTarget

        public java.util.Optional<java.lang.String> getJvmTarget()
        Get the target version of the generated JVM bytecode as a string.
        Returns:
        Target version of the generated JVM bytecode as a string.
      • withTargetCompatibility

        public EspressoBuildConfig withTargetCompatibility​(java.lang.String targetCompatibility)
        Set the target version of JVM the project sources are compatible with.
        Parameters:
        targetCompatibility - E.g. "VERSION_12"
        Returns:
        self instance for chaining.
      • getTargetCompatibility

        public java.util.Optional<java.lang.String> getTargetCompatibility()
        Get the target version of JVM the project sources are compatible with.
        Returns:
        Target version of JVM the project sources are compatible with.
      • withMinSdk

        public EspressoBuildConfig withMinSdk​(int apiLevel)
        Set the minimum Android SDK version to compile the server for. By default, the version from the app build.gradle is used.
        Parameters:
        apiLevel - E.g. 18.
        Returns:
        self instance for chaining.
      • getMinSdkVersion

        public java.util.Optional<java.lang.Integer> getMinSdkVersion()
        Get the minimum Android SDK version.
        Returns:
        Minimum Android SDK version.
      • withTargetSdk

        public EspressoBuildConfig withTargetSdk​(int apiLevel)
        Set the target Android SDK version to compile the server for. By default, the version from the app build.gradle is used.
        Parameters:
        apiLevel - E.g. 28.
        Returns:
        self instance for chaining.
      • getTargetSdkVersion

        public java.util.Optional<java.lang.Integer> getTargetSdkVersion()
        Get the target Android SDK version.
        Returns:
        Target Android SDK version.
      • withKotlinVersion

        public EspressoBuildConfig withKotlinVersion​(java.lang.String version)
        Kotlin version to compile the server for. By default, the version from the build.gradle is used.
        Parameters:
        version - E.g. "1.5.10".
        Returns:
        self instance for chaining.
      • getKotlinVersion

        public java.util.Optional<java.lang.String> getKotlinVersion()
        Get the target Kotlin version.
        Returns:
        Kotlin version.
      • withAdditionalAppDependencies

        public EspressoBuildConfig withAdditionalAppDependencies​(java.util.List<java.lang.String> dependencies)
        Set a non-empty array of dependent module names with their versions. The scripts add all these items as "implementation" lines of dependencies category in the app build.gradle script.
        Parameters:
        dependencies - E.g. ["xerces.xercesImpl:2.8.0", "xerces.xmlParserAPIs:2.6.2"].
        Returns:
        self instance for chaining.
      • getAdditionalAppDependencies

        public java.util.Optional<java.util.List<java.lang.String>> getAdditionalAppDependencies()
        Get the array of dependent application module names with their versions.
        Returns:
        Dependent module names with their versions.
      • withAdditionalAndroidTestDependencies

        public EspressoBuildConfig withAdditionalAndroidTestDependencies​(java.util.List<java.lang.String> dependencies)
        Set a non-empty array of dependent module names with their versions. The scripts add all these items as "androidTestImplementation" lines of dependencies category in the app build.gradle script.
        Parameters:
        dependencies - E.g. ["xerces.xercesImpl:2.8.0", "xerces.xmlParserAPIs:2.6.2"].
        Returns:
        self instance for chaining.
      • getAdditionalAndroidTestDependencies

        public java.util.Optional<java.util.List<java.lang.String>> getAdditionalAndroidTestDependencies()
        Get the array of dependent Android test module names with their versions.
        Returns:
        Dependent module names with their versions.