- proper android variant support (e.g. files in
src/debug/graphql
will override those insrc/main/graphql
- do not require
src/main/graphql
anymore - proper multi project support
- proper variant output
- more verification for bad configurations fail if generateModelBuilder && generateKotlinModels
- more tests
- no more sonatype downloads for tests
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lintOptions { | |
// You can put severity configuration inside an XML file. | |
// Order inside the XML file is important. | |
setLintConfig(file("lint.xml")) | |
// Change the severity of the passed issueIds. | |
// Order is important. | |
// This overrides the XML configuration. | |
fatal("UnusedResources", "MissingTranslation") | |
error("UnusedResources", "MissingTranslation") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lintOptions { | |
// disable checks enabled by default | |
disable("RtlHardcoded", "RtlCompat") | |
// Enable some checks that are disabled by default. | |
enable("NegativeMargin", "GoogleAppIndexingApiWarning") | |
// Only check this exact list of issues | |
// Shorthand for disable(everything) and enable(these issues) | |
check("UnusedResources", "DevModeObsolete") | |
// Shorthand for enable(allWhereSeverityIsWarning) | |
// Severity is resolved at the start of configuration so this will not be affected by |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MissingTranslation | |
------------------ | |
Summary: Incomplete translation | |
Priority: 8 / 10 | |
Severity: Fatal | |
Category: Correctness:Messages | |
If an application has more than one locale, then all the strings declared in | |
one language should also be translated in all other languages. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
android { | |
lintOptions { | |
isCheckDependencies = true | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://github.com/JetBrains/kotlin/blob/65244b4bea81f737466618927d4f3afe339cad0d/libraries/stdlib/jvm/src/kotlin/internal/PlatformImplementations.kt#L42 | |
internal val IMPLEMENTATIONS: PlatformImplementations = run { | |
val version = getJavaVersion() | |
if (version >= 0x10008) { | |
try { | |
return@run castToBaseType<PlatformImplementations>(Class.forName("kotlin.internal.jdk8.JDK8PlatformImplementations").newInstance()) | |
} catch (e: ClassNotFoundException) { } | |
try { | |
return@run castToBaseType<PlatformImplementations>(Class.forName("kotlin.internal.JRE8PlatformImplementations").newInstance()) | |
} catch (e: ClassNotFoundException) { } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val matchResult = Regex("(?<key>.*)=(?<value>.*)").matchEntire("jdk=8") | |
if (matchResult != null) { | |
println("key=${matchResult.groups.get("key")!!.value}") | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val closeable = object: Closeable { | |
override fun close() { | |
throw Exception("exception from close") | |
} | |
} | |
closeable.use { | |
throw Exception("exception from use") | |
} | |
// Java6: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
internal val IMPLEMENTATIONS: PlatformImplementations = run { | |
val version = getJavaVersion() | |
if (version >= 0x10008) { | |
try { | |
return@run castToBaseType<PlatformImplementations>(Class.forName("kotlin.internal.jdk8.JDK8PlatformImplementations").newInstance()) | |
} catch (e: ClassNotFoundException) { } | |
try { | |
return@run castToBaseType<PlatformImplementations>(Class.forName("kotlin.internal.JRE8PlatformImplementations").newInstance()) | |
} catch (e: ClassNotFoundException) { } | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
martin@bowser-castle ~ $ ls -al kotlin-stdlib-*.jar | |
1326269 Sep 14 16:58 kotlin-stdlib-1.3.50.jar | |
3129 Sep 14 16:58 kotlin-stdlib-jdk7-1.3.50.jar | |
15476 Sep 14 16:58 kotlin-stdlib-jdk8-1.3.50.jar |