File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change 2
2
3
3
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
4
4
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
5
- import com.android.build.gradle.tasks.GenerateLocaleConfigTask
5
+ import com.android.build.gradle.tasks.ExtractSupportedLocalesTask
6
6
7
7
// Grotesque workaround for https://issuetracker.google.com/issues/279780940
8
8
System .setProperty(" com.android.tools.r8.disableApiModeling" , " 1" )
@@ -97,12 +97,10 @@ tasks.withType<KotlinCompile>().configureEach {
97
97
}
98
98
99
99
// Grotesque workaround for https://issuetracker.google.com/issues/281825213
100
- tasks.withType<GenerateLocaleConfigTask >().configureEach {
100
+ tasks.withType<ExtractSupportedLocalesTask >().configureEach {
101
101
doLast {
102
- localeConfig.asFileTree.files.forEach {
103
- val lines = it.readLines()
104
- val newLines = lines.subList(0 , 2 ) + lines.subList(2 , lines.size - 1 ).sorted() + lines.last()
105
- it.writeText(newLines.joinToString(separator = " \n " ))
106
- }
102
+ val file = localeList.asFile.get()
103
+ val lines = file.readLines()
104
+ file.writeText((listOf (lines[0 ]) + lines.subList(1 , lines.size).sorted()).joinToString(separator = " \n " ))
107
105
}
108
106
}
You can’t perform that action at this time.
0 commit comments