Migrate compiler, idea and others to new case conversion api
This commit is contained in:
+1
-1
@@ -53,7 +53,7 @@ private fun processSingleClasspathEntry(rootFile: File): Map<String, DeclaredPro
|
||||
for (line in text) {
|
||||
val parts = line.split(",")
|
||||
if (parts.size == 2) {
|
||||
val kind = parts[1].toUpperCase(Locale.ENGLISH)
|
||||
val kind = parts[1].uppercase()
|
||||
if (INCREMENTAL_DECLARED_TYPES.contains(kind)) {
|
||||
nameToType[parts[0]] = enumValueOf(kind)
|
||||
}
|
||||
|
||||
+1
-1
@@ -50,7 +50,7 @@ class IncrementalProcessor(private val processor: Processor, private val kind: D
|
||||
if (fromOptions == null) {
|
||||
RuntimeProcType.NON_INCREMENTAL
|
||||
} else {
|
||||
val declaredType = fromOptions.drop("org.gradle.annotation.processing.".length).toUpperCase(Locale.US)
|
||||
val declaredType = fromOptions.drop("org.gradle.annotation.processing.".length).uppercase()
|
||||
if (ALLOWED_RUNTIME_TYPES.contains(declaredType)) {
|
||||
enumValueOf(declaredType)
|
||||
} else {
|
||||
|
||||
@@ -36,7 +36,8 @@ class JavaKaptContextTest : TestCase() {
|
||||
val annotatedElements = roundEnv.getElementsAnnotatedWith(annotation)
|
||||
|
||||
for (annotatedElement in annotatedElements) {
|
||||
val generatedClassName = annotatedElement.simpleName.toString().capitalize() + annotationName.capitalize()
|
||||
val generatedClassName = annotatedElement.simpleName.toString().replaceFirstChar(Char::uppercaseChar) +
|
||||
annotationName.replaceFirstChar(Char::uppercaseChar)
|
||||
val file = processingEnv.filer.createSourceFile("generated." + generatedClassName)
|
||||
file.openWriter().use {
|
||||
it.write(
|
||||
|
||||
@@ -15,7 +15,7 @@ import java.nio.file.Files
|
||||
class KaptPathsTest : TestCase() {
|
||||
@Test
|
||||
fun testSymbolicLinks() {
|
||||
if (System.getProperty("os.name").toLowerCase().contains("win")) return
|
||||
if (System.getProperty("os.name").lowercase().contains("win")) return
|
||||
val tempDir = Files.createTempDirectory("kapt-test").toFile()
|
||||
try {
|
||||
fun File.writeJavaClass() = apply {
|
||||
|
||||
Reference in New Issue
Block a user