Skip to content

Commit

Permalink
WIP: core: Upgrade Kotlin to 1.5 (#733)
Browse files Browse the repository at this point in the history
* core: Upgrade Kotlin to 1.5
* core: Upgrade Kotlin to 1.5.20
  • Loading branch information
hotchemi authored Jun 27, 2021
1 parent d091f7d commit c887672
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 6 deletions.
2 changes: 2 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,7 @@ allprojects {
mavenCentral()
google()
jcenter()
// TODO: remove after publishing kompile-testing to Maven Central
maven { url 'https://jitpack.io' }
}
}
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ POM_DEVELOPER_URL = https://github.com/hotchemi
DOKKA_VERSION = 1.4.20
PUBLISH_PLUGIN_VERSION = 0.13.0
GRADLE_PLUGIN_VERSION = 4.0.0
KOTLIN_VERSION = 1.3.50
KOTLIN_METADATA_VERSION = 0.0.5
KOTLIN_VERSION = 1.5.20
KOTLIN_METADATA_VERSION = 0.3.0
ANDROIDX_LIBRARY_VERSION= 1.0.0
LIFECYCLE_VERSION = 2.2.0
ARC_TESTING_VERSION = 1.1.1
Expand All @@ -34,7 +34,7 @@ COMPILE_TESTING_VERSION = 0.12
LINT_VERSION = 26.3.2
ROBOLECTRIC_VERSION = 3.3.2
COMMONS_IO_VERSION = 2.6
KOMPILE_TESTING_VERSION = 0.1.3
KOMPILE_TESTING_VERSION = 0.1.4

# Android configuration
COMPILE_SDK_VERSION = android-29
Expand Down
12 changes: 10 additions & 2 deletions processor/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,17 @@ apply plugin: AarToJarConversionPlugin
// Connect sources & tests to library project
convertAarsToJar.dependsOn ":library:assembleRelease"

configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
def requested = details.requested
if (requested.group == 'org.jetbrains.kotlin' && requested.name == 'kotlin-reflect') {
details.useVersion KOTLIN_VERSION
}
}
}

dependencies {
compile "androidx.annotation:annotation:$ANDROIDX_LIBRARY_VERSION"
compile "org.jetbrains.kotlin:kotlin-stdlib:$KOTLIN_VERSION"
compile "org.jetbrains.kotlinx:kotlinx-metadata-jvm:$KOTLIN_METADATA_VERSION"
compile "com.squareup:javapoet:$JAVAPOET_VERSION"
compile "com.squareup:kotlinpoet:$KOTLINPOET_VERSION"
Expand All @@ -30,5 +38,5 @@ dependencies {
testCompile "commons-io:commons-io:$COMMONS_IO_VERSION"
testCompile "com.squareup.okio:okio:2.1.0"
testCompile "androidx.legacy:legacy-support-v4:$ANDROIDX_LIBRARY_VERSION"
testCompile "org.permissionsdispatcher:kompile-testing:$KOMPILE_TESTING_VERSION"
testCompile "com.github.permissions-dispatcher:kompile-testing:$KOMPILE_TESTING_VERSION"
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ fun withPermissionCheckMethodName(e: ExecutableElement) = "${e.simpleString().tr

fun Element.kotlinMetadata(): KotlinClassMetadata? =
getAnnotation(Metadata::class.java)?.run {
KotlinClassMetadata.read(KotlinClassHeader(kind, metadataVersion, bytecodeVersion, data1, data2, extraString, packageName, extraInt))
KotlinClassMetadata.read(KotlinClassHeader(kind, metadataVersion, data1, data2, extraString, packageName, extraInt))
}

val Element.isInternal: Boolean
Expand Down

0 comments on commit c887672

Please sign in to comment.