All Downloads are FREE. Search and download functionalities are using the official Maven repository.

wtf.emulator.GradleCompatFactory Maven / Gradle / Ivy

Go to download

With this Gradle plugin you can run your Android instrumentation tests with emulator.wtf

There is a newer version: 0.18.0
Show newest version
package wtf.emulator;

import com.vdurmont.semver4j.Semver;
import org.gradle.api.invocation.Gradle;

public class GradleCompatFactory {
  private static final Semver GRADLE_6_6 = new Semver("6.6",Semver.SemverType.LOOSE);
  private static final Semver GRADLE_7_6 = new Semver("7.6",Semver.SemverType.LOOSE);

  public static GradleCompat get(Gradle gradle) {
    Semver gradleVersion = new Semver(gradle.getGradleVersion(), Semver.SemverType.LOOSE);

    if (gradleVersion.isGreaterThanOrEqualTo(GRADLE_7_6)) {
      return new GradleCompat_7_6(gradle);
    } else if (gradleVersion.isGreaterThanOrEqualTo(GRADLE_6_6)) {
      return new GradleCompat_6_6(gradle);
    } else {
      return new GradleCompat_6_1();
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy