Skip to content

Instantly share code, notes, and snippets.

@cbedoy
Created January 24, 2023 19:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cbedoy/a33c8fc77326b170bb5e32be9122025a to your computer and use it in GitHub Desktop.
Save cbedoy/a33c8fc77326b170bb5e32be9122025a to your computer and use it in GitHub Desktop.
Crea un codigo para generar un bom para usarlo en android
import org.gradle.api.Project
// Create the BOM file
val bomFile = project.file("dependencies.bom")
// Get all dependencies of the project
val dependencies = project.configurations.getByName("implementation").allDependencies
// Write the dependencies to the BOM file
bomFile.writeText(dependencies.joinToString("\n"))
// Add the BOM file to the project's artifacts
project.artifacts.add("implementation", bomFile)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment