Colton Idle
10/10/2025, 9:27 PMbuildscript {
// this is all I have left to migrate
ext.kotlin_version = '1.9.24'
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.jetbrains.kotlin:kotlin-serialization:$kotlin_version"
classpath 'com.android.tools.build:gradle:8.10.1'
classpath 'com.jakewharton:butterknife-gradle-plugin:10.2.3'
classpath "org.jacoco:org.jacoco.core:0.8.13"
}
}
it seems like theres no way to just migrate to new plugins block directly... instead you have to lookup the documentation for each plugin. am i correct in my understanding? and what do i do if a plugin doesn't publish how to use the new plugins block (like butterknife)?ephemient
10/10/2025, 10:04 PM// settings.gradle.kts
pluginManagement {
resolutionStrategy {
eachPlugin {
if (requested.id == "com.jakewharton.butterknife") useModule("com.jakewharton:butterknife-gradle-plugin")
}
}
}
enables
plugins {
id("com.jakewharton.butterknife")
}
to work without additional buildscript setup. but as https://github.com/JakeWharton/butterknife says,
> Attention: This tool is now deprecated. Please switch to view binding.ephemient
10/10/2025, 10:12 PM// root build.gradle.kts
plugins {
val kotlinVersion = "1.9.24"
id("com.android.library") version "8.10.1" apply false
id("org.jetbrains.kotlin.android") version kotlinVersion apply false
id("org.jetbrains.kotlin.plugin.serialization") version kotlinVersion apply false
}
puts them in the root build script's classpath which means all subprojects will be able to
plugins {
id("com.android.library")
id("org.jetbrains.kotlin.jvm")
id("org.jetbrains.kotlin.plugin.serialization")
}
without a version specifier. I'd switch to the version catalog thoughephemient
10/10/2025, 10:16 PMplugins {
id("jacoco")
}
jacoco {
toolVersion = "0.8.13"
}
in JVM projects or
android {
testCoverage {
jacocoVersion = "0.8.13"
}
}
in Android projectsColton Idle
10/10/2025, 10:37 PMColton Idle
10/10/2025, 10:40 PMColton Idle
10/10/2025, 10:42 PMclasspath 'com.android.tools.build:gradle:8.10.1'? i need to either use android library or android application?ephemient
10/10/2025, 10:42 PMephemient
10/10/2025, 10:43 PMephemient
10/10/2025, 10:43 PMColton Idle
10/10/2025, 10:44 PMColton Idle
10/10/2025, 10:45 PMColton Idle
10/11/2025, 5:02 PMephemient
10/11/2025, 6:08 PMrequested.versionColton Idle
10/23/2025, 9:37 PMif (requested.version == "com.jakewharton.butterknife") useModule("com.jakewharton:butterknife-gradle-plugin:10.2.3") ?Colton Idle
10/23/2025, 9:38 PMephemient
10/23/2025, 9:38 PMif (requested.id == "com.jakewharton.butterknife") useModule("com.jakewharton:butterknife-gradle-plugin:${requested.version}")Colton Idle
10/23/2025, 9:39 PMif (requested.id.toString() == "com.jakewharton.butterknife") useModule("com.jakewharton:butterknife-gradle-plugin:${requested.version}")eephemient
10/23/2025, 9:40 PM.id.id or somethingColton Idle
10/23/2025, 9:40 PM