Releases: airbnb/paris
2.1.1
What's Changed
- Roll back to Java 11 bytecode target for broader compatibility.
Full Changelog: 2.1.0...2.1.1
2.1.0
What's Changed
- Min SDK has been increased from 16 to 21.
- Project now requires Java 17.
- Upgraded Gradle to 8.13, AGP to 8.13.0, Kotlin to 1.9.25, and KSP to 1.9.25-1.0.20.
- Updated Robolectric and kotlin-compile-testing dependencies.
- Upgraded gradle-maven-publish-plugin to 0.34.0 (restores license metadata in published POMs).
- Switch CI tests to run on Ubuntu.
Full Changelog: 2.0.2...2.1.0
2.0.2
Updates kotlin, ksp, and the xprocessing library.
Notably, the androidx.room:room-compiler-processing library (aka xprocessing) has been updated to 2.6.0-alpha01. This version is incompatible with previous versions due to a breaking API change. All annotation processors using this library must be on the same version. Other annotation processors such as Epoxy and Paris also use xprocessing and if you use them you need to use a version of them that also uses xprocessing 2.6.0-alpha01
2.0.0
Paris now supports Kotlin Symbol Processing for faster builds! https://github.com/google/ksp
Breaking changes needed to support KSP:
- ParisConfig annotation can no longer be used on package elements, only on class or interfaces
- R class references used in annotations cannot be star imported
- Added
aggregateStyleablesOnClassPathparameter to @ParisConfig. This must now be set to true to have the module generate a Paris class using only classpath dependencies if there are no Styleables in the module sources.
Note: Due to a bug in KSP (google/ksp#630) it is recommended to disable KSP incremental compilation until the bug is fixed in KSP, otherwise you may encounter spurious build failures.
Additionally, if you are using R2 generation via the butterknife gradle plugin you must configure KSP to be aware of those generated sources.
This can be done either via the experiment KSP setting allowSourcesFromOtherPlugins
// build.gradle.kts
ksp {
allowSourceFromOtherPlugins=true
}
Or by manually registering R2 sources as an input to KSP
// In a gradle plugin or build.gradle.kts
project.afterEvaluate {
setUpR2TaskDependency()
}
fun Project.setUpR2TaskDependency() {
requireAndroidVariants().forEach { variant ->
val r2Task = runCatching { project.tasks.named("generate${variant.name.capitalize()}R2") }.getOrNull()
if (r2Task != null) {
project.tasks.named("ksp${variant.name.capitalize()}Kotlin").dependsOn(r2Task)
project.extensions.configure(KotlinAndroidProjectExtension::class.java) {
sourceSets.getByName(variant.name)
.kotlin
.srcDir("build/generated/source/r2/${variant.name}")
}
}
}
}
/**
* Return the Android variants for this module, or error if this is not a module with a known Android plugin.
*/
fun Project.requireAndroidVariants(): DomainObjectSet<out BaseVariant> {
return androidVariants() ?: error("no known android extension found for ${project.name}")
}
/**
* Return the Android variants for this module, or null if this is not a module with a known Android plugin.
*/
fun Project.androidVariants(): DomainObjectSet<out BaseVariant>? {
return when (val androidExtension = this.extensions.findByName("android")) {
is LibraryExtension -> {
androidExtension.libraryVariants
}
is AppExtension -> {
androidExtension.applicationVariants
}
else -> null
}
}1.7.3
v1.7.2
1.7.1
-
Change
ParisConfigannotation to be applicable to class or interface types. New recommendation is to use it on an interface instead of a package to avoid a bug with spurious incremental annotation failure. -
Fixed annotation processor bugs with Kotlin 1.4. Project should now be compatible with Kotlin 1.4.x - previous Paris versions would crash at compile time.
1.6.0
1.5.0
v1.4.0
- Added support for namespaced resources.