mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-27 00:38:11 -07:00
Remove warning.
This commit is contained in:
parent
357715f6c7
commit
833f2e2bbf
1 changed files with 6 additions and 0 deletions
|
@ -219,11 +219,17 @@ public class AndroidPlugin @Inject constructor(val javaCompiler: JavaCompiler, v
|
||||||
override fun flagsFor(project: Project, currentFlags: List<String>) : List<String> {
|
override fun flagsFor(project: Project, currentFlags: List<String>) : List<String> {
|
||||||
if (isAndroid(project)) {
|
if (isAndroid(project)) {
|
||||||
val result = arrayListOf<String>()
|
val result = arrayListOf<String>()
|
||||||
|
var noWarn = false
|
||||||
if (! currentFlags.contains("-source")) with(result) {
|
if (! currentFlags.contains("-source")) with(result) {
|
||||||
addAll(listOf("-source", "1.6"))
|
addAll(listOf("-source", "1.6"))
|
||||||
|
noWarn = true
|
||||||
}
|
}
|
||||||
if (!currentFlags.contains("-target")) with(result) {
|
if (!currentFlags.contains("-target")) with(result) {
|
||||||
addAll(listOf("-target", "1.6"))
|
addAll(listOf("-target", "1.6"))
|
||||||
|
noWarn = true
|
||||||
|
}
|
||||||
|
if (noWarn) {
|
||||||
|
result.add("-nowarn")
|
||||||
}
|
}
|
||||||
return result
|
return result
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue