KotlinVersionProvider { public String getKotlinVersionForGradle() { String version = baseVersion; if (version.contains("-release-")) { version = version.substring(0, version.indexOf("-release-")); } return version; } KotlinVersionProvider(String baseVersion); static KotlinVersionProvider getInstance(); String getKotlinVersionForGradle();  }
@Test public void testKotlinVersionWithReleaseWord() { KotlinVersionProvider inst = new KotlinVersionProvider("1.3.72-release-485"); assertEquals("1.3.72", inst.getKotlinVersionForGradle()); }
@Test public void testPlainKotlinVersion() { KotlinVersionProvider inst = new KotlinVersionProvider("1.3.72"); assertEquals("1.3.72", inst.getKotlinVersionForGradle()); }