Skip to content

Commit

Permalink
Updating Dependencies with AGP and Kotlin version upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
vivek-varun committed Oct 15, 2023
1 parent 39ee7ee commit 9411a31
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 17 deletions.
6 changes: 3 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ fun KotlinCompile.configureTask() {
}

fun BaseExtension.configureExtension() {
compileSdkVersion(33)
compileSdkVersion(34)

defaultConfig {
minSdk = 21
Expand All @@ -56,7 +56,7 @@ fun BaseExtension.configureExtension() {


plugins {
id("org.jetbrains.kotlinx.binary-compatibility-validator") version "0.12.1"
id("org.jetbrains.kotlinx.binary-compatibility-validator") version "0.13.2"
}

apiValidation {
Expand All @@ -65,4 +65,4 @@ apiValidation {

tasks.register("clean", Delete::class) {
delete(rootProject.buildDir)
}
}
3 changes: 1 addition & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,12 @@ kapt.include.compile.classpath=false
# resources declared in the library itself and none from the library's dependencies,
# thereby reducing the size of the R class for that library
android.nonTransitiveRClass=true
android.disableAutomaticComponentCreation=true
# Build Features
android.defaults.buildfeatures.buildconfig=false
android.defaults.buildfeatures.resvalues=false
# Library Information
GROUP=com.deliveryhero.whetstone
VERSION_NAME=0.5.1-SNAPSHOT
VERSION_NAME=0.6.0-SNAPSHOT
# Maven central
SONATYPE_HOST=S01
RELEASE_SIGNING_ENABLED=true
Expand Down
16 changes: 8 additions & 8 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
[versions]
androidGradle = "7.4.2"
androidGradle = "8.0.2"
androidxActivity = "1.5.0"
androidxAppCompat = "1.3.1"
androidxCompose = "1.2.0"
androidxComposeCompiler = "1.4.4"
androidxCompose = "1.5.3"
androidxComposeCompiler = "1.5.3"
androidxCore = "1.7.0"
androidxFragment = "1.5.0"
androidxLifecycle = "2.5.0"
androidxWork = "2.7.0"
anvil = "2.4.4"
dagger = "2.45"
kotlin = "1.8.10"
anvil = "2.4.8"
dagger = "2.48.1"
kotlin = "1.9.10"
kotlinxCoroutines = "1.6.4"
mavenPublish = "0.22.0"
mavenPublish = "0.25.3"
truth = "1.1.3"
autoService = "1.0.1"
autoService = "1.1.1"

[plugins]
kotlinJvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
6 changes: 6 additions & 0 deletions whetstone-gradle-plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,9 @@ fun loadParentProperties() {
extra.set(key, value)
}
}

afterEvaluate {
with(tasks) {
findByName("kaptGenerateStubsKotlin")?.dependsOn(findByName("generateBuildConfig"))
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@file:OptIn(ExperimentalCompilerApi::class)

package com.deliveryhero.whetstone.codegen

import com.deliveryhero.whetstone.SingleIn
Expand All @@ -10,6 +11,7 @@ import com.squareup.kotlinpoet.ParameterizedTypeName.Companion.parameterizedBy
import com.squareup.kotlinpoet.STAR
import com.squareup.kotlinpoet.asClassName
import com.squareup.kotlinpoet.asTypeName
import com.tschuchort.compiletesting.JvmCompilationResult
import com.tschuchort.compiletesting.KotlinCompilation
import dagger.Binds
import dagger.Component
Expand All @@ -24,7 +26,7 @@ import kotlin.reflect.full.*
import kotlin.test.assertEquals
import kotlin.test.assertTrue

internal fun KotlinCompilation.Result.validateInstanceBinding(
internal fun JvmCompilationResult.validateInstanceBinding(
classUnderTest: String,
baseClass: KClass<*>,
scope: KClass<*>
Expand All @@ -43,7 +45,7 @@ internal fun KotlinCompilation.Result.validateInstanceBinding(
assertEquals(baseClass, bindsMethod.returnType.classifier)
}

internal fun KotlinCompilation.Result.validateInjectorBinding(classUnderTest: String, scope: KClass<*>) {
internal fun JvmCompilationResult.validateInjectorBinding(classUnderTest: String, scope: KClass<*>) {
val clas = classLoader.loadClass(classUnderTest).kotlin
val bindingModule = classLoader.loadClass("${classUnderTest}BindingsModule").kotlin
val membersInjector = MembersInjector::class.asClassName()
Expand All @@ -62,7 +64,7 @@ internal fun KotlinCompilation.Result.validateInjectorBinding(classUnderTest: St
assertEquals(membersInjector.parameterizedBy(STAR), bindsMethod.returnType.asTypeName())
}

internal fun KotlinCompilation.Result.validateAppComponent() {
internal fun JvmCompilationResult.validateAppComponent() {
val appComponent = classLoader.loadClass("GeneratedApplicationComponent").kotlin

assertTrue(appComponent.isAbstract)
Expand Down

0 comments on commit 9411a31

Please sign in to comment.