Search Gradle plugins

io.github.appspiriment.library

This Gradle plugin configures an Android Library module with Hilt Dependency Injection (DI) using KSP (Kotlin Symbol Processing) and does not configure KAPT. It automatically applies the Hilt plugin to the library, enabling DI functionality with KSP. The plugin features a configurable extension, `configureLibrary`, which allows you to enable Compose capabilities by setting `isComposeLibrary` to true within the extension. Additionally, the plugin updates the `appspirimentlibs.versions.toml` file to manage and include the required dependencies for the library. This plugin streamlines the setup for Android libraries, providing seamless integration with Hilt (via KSP) and optional support for Compose.

https://github.com/appspiriment/AndroidConventionPlugins

Sources: https://github.com/appspiriment/AndroidConventionPlugins

Version 0.0.3.dev-51 (latest)

Created 28 January 2025.

This Gradle plugin configures an Android Library module with Hilt Dependency Injection (DI) using KSP (Kotlin Symbol Processing) and does not configure KAPT. It automatically applies the Hilt plugin to the library, enabling DI functionality with KSP. The plugin features a configurable extension, `configureLibrary`, which allows you to enable Compose capabilities by setting `isComposeLibrary` to true within the extension. Additionally, the plugin updates the `appspirimentlibs.versions.toml` file to manage and include the required dependencies for the library. This plugin streamlines the setup for Android libraries, providing seamless integration with Hilt (via KSP) and optional support for Compose.

Add this plugin to your build using the plugins DSL:

plugins {
  id("io.github.appspiriment.library") version "0.0.3.dev-51"
}

See also:

  • Adding the plugin to build logic for usage in precompiled script plugins.

    See the relevant documentation for more information.

    Add this plugin as a dependency to <convention-plugins-build>/build.gradle(.kts):

    dependencies {
      implementation("io.github.appspiriment.library:io.github.appspiriment.library.gradle.plugin:0.0.3.dev-51")
    }
    It can then be applied in the precompiled script plugin:
    plugins {
      id("io.github.appspiriment.library")
    }
  • The legacy method of plugin application. See the relevant documentation for more information.
    buildscript {
      repositories {
        gradlePluginPortal()
      }
      dependencies {
        classpath("io.github.appspiriment.library:io.github.appspiriment.library.gradle.plugin:0.0.3.dev-51")
      }
    }
    
    apply(plugin = "io.github.appspiriment.library")
  • Applying plugins to all subprojects .