Package com.google.devtools.ksp.gradle
Object AndroidPluginIntegration
-
- All Implemented Interfaces:
public class AndroidPluginIntegrationThis helper class handles communication with the android plugin. It is isolated in a separate class to avoid adding dependency on the android plugin. Instead, we add a compileOnly dependency to the Android Plugin, which means we can still function without the Android plugin. The downside is that we need to ensure never to access Android plugin APIs directly without checking its existence (we have tests covering that case).
-
-
Field Summary
Fields Modifier and Type Field Description public final static AndroidPluginIntegrationINSTANCE
-
Method Summary
Modifier and Type Method Description final UnitforEachAndroidSourceSet(Project project, Function1<String, Unit> onSourceSet)final List<String>getCompilationSourceSets(KotlinJvmAndroidCompilation kotlinCompilation)final UnitsyncSourceSets(Project project, KotlinJvmAndroidCompilation kotlinCompilation, TaskProvider<?> kspTaskProvider, Provider<Directory> javaOutputDir, Provider<Directory> kotlinOutputDir, Provider<Directory> classOutputDir, FileCollection resourcesOutputDir)final BooleanuseLegacyVariantApi(Project $self)Returns false for AGP versions 8.10.0-alpha03 or higher. -
-
Method Detail
-
forEachAndroidSourceSet
final Unit forEachAndroidSourceSet(Project project, Function1<String, Unit> onSourceSet)
-
getCompilationSourceSets
final List<String> getCompilationSourceSets(KotlinJvmAndroidCompilation kotlinCompilation)
-
syncSourceSets
final Unit syncSourceSets(Project project, KotlinJvmAndroidCompilation kotlinCompilation, TaskProvider<?> kspTaskProvider, Provider<Directory> javaOutputDir, Provider<Directory> kotlinOutputDir, Provider<Directory> classOutputDir, FileCollection resourcesOutputDir)
-
useLegacyVariantApi
final Boolean useLegacyVariantApi(Project $self)
Returns false for AGP versions 8.10.0-alpha03 or higher.
Returns true for older AGP versions or when AGP version cannot be determined.
-
-
-
-