All Projects → GradleUp → Auto Manifest

GradleUp / Auto Manifest

Licence: apache-2.0
Generates AndroidManifest.xml in simple libraries so that you don't have to

Programming Languages

kotlin
9241 projects

Projects that are alternatives of or similar to Auto Manifest

Hunter
A fast, incremental, concurrent framework to develop compile plugin for android project to manipulate bytecode
Stars: ✭ 999 (+1858.82%)
Mutual labels:  gradle, gradle-plugin
Enigma
Gradle Plugin - Obfuscator String Encryption (Android/Java)
Stars: ✭ 43 (-15.69%)
Mutual labels:  gradle, gradle-plugin
Gradle Test Logger Plugin
A Gradle plugin for printing beautiful logs on the console while running tests
Stars: ✭ 460 (+801.96%)
Mutual labels:  gradle, gradle-plugin
Gradle Static Analysis Plugin
Easy setup of static analysis tools for Android and Java projects.
Stars: ✭ 398 (+680.39%)
Mutual labels:  gradle, gradle-plugin
Ktlint Gradle
A ktlint gradle plugin
Stars: ✭ 713 (+1298.04%)
Mutual labels:  gradle, gradle-plugin
Javafx Gradle Plugin
Gradle plugin for JavaFX
Stars: ✭ 425 (+733.33%)
Mutual labels:  gradle, gradle-plugin
Laziertracker
本项目通过Android字节码插桩插件实现Android端无埋点(或自动埋点),并且支持根据配置文件实现业务数据的自动采集。
Stars: ✭ 485 (+850.98%)
Mutual labels:  gradle, gradle-plugin
Gradle Android Command Plugin
Handy commands for testing Android on CI
Stars: ✭ 349 (+584.31%)
Mutual labels:  gradle, gradle-plugin
Gogradle
A Gradle Plugin Providing Full Support for Go
Stars: ✭ 712 (+1296.08%)
Mutual labels:  gradle, gradle-plugin
Gradle Git
Git plugin for Gradle
Stars: ✭ 559 (+996.08%)
Mutual labels:  gradle, gradle-plugin
Androidautotrack
Android Asm 插桩 教学
Stars: ✭ 378 (+641.18%)
Mutual labels:  gradle, gradle-plugin
Gradle Defaults
Plugin providing opinionated defaults for Gradle projects.
Stars: ✭ 7 (-86.27%)
Mutual labels:  gradle, gradle-plugin
Axion Release Plugin
Gradle release & version management plugin.
Stars: ✭ 372 (+629.41%)
Mutual labels:  gradle, gradle-plugin
Bnd
Bnd/Bndtools. Tooling to build OSGi bundles including Eclipse, Maven, and Gradle plugins.
Stars: ✭ 446 (+774.51%)
Mutual labels:  gradle, gradle-plugin
Calces Gradle Plugin
Android构建工具集:包含快速实现组件化构建脚本,快速实现屏幕最小宽度适配脚本
Stars: ✭ 366 (+617.65%)
Mutual labels:  gradle, gradle-plugin
Gradle Download Task
Adds a download task to Gradle that displays progress information
Stars: ✭ 478 (+837.25%)
Mutual labels:  gradle, gradle-plugin
Javapackager
📦 Gradle/Maven plugin to package Java applications as native Windows, Mac OS X, or GNU/Linux executables and create installers for them.
Stars: ✭ 285 (+458.82%)
Mutual labels:  gradle, gradle-plugin
Swagger Gradle Codegen
💫 A Gradle Plugin to generate your networking code from Swagger
Stars: ✭ 330 (+547.06%)
Mutual labels:  gradle, gradle-plugin
Let
Annotation based simple API flavored with AOP to handle new Android runtime permission model
Stars: ✭ 532 (+943.14%)
Mutual labels:  gradle, gradle-plugin
Plantuml Gradle Plugin
Gradle plugin to build PlantUML diagrams from code (for living and up-to-date documentation)
Stars: ✭ 27 (-47.06%)
Mutual labels:  gradle, gradle-plugin

Auto Manifest CI

AndroidManifest.xml file is crucial to define Android specific properties like minSdkVersion, uses-permission etc.

Unfortunately, package property must be defined in AndroidManifest.xml and mandatory for BuildConfig and R class generation. In most of my Gradle modules, AndroidManifest.xml is just 1 line:

<manifest package="foo" />

Here comes AutoManifest Gradle Plugin to rescue 🚀

  • This is not meant for full replacement for AndroidManifest.xml file. It is useful for those 1-liner manifests where you don't have any Activity/Service or permission defined.
  • It is easy to integrate into current projects. If manifest file is present, it will be no-op.
  • You can add it per module or to the root build.gradle. If applied to root, it will even auto generate package names based on module paths.

Configuration

Bintray Gradle Plugin Portal

Add the plugin in your build.gradle file (preferably in root one)

Kotlin
plugins {
    id("com.gradleup.auto.manifest") version "<latest-version>"
}

autoManifest {
    // Mandatory packageName
    packageName.set("com.company.example")

    // OPTIONAL //
    // Applies recursively to sub-modules so you don't have to
    // Sub-module package names will be auto generated by using their relative path
    // Default: true
    applyRecursively.set(true)
    
    // OPTIONAL //
    // Using dashes `-` is pretty common in module names. But they are not allowed within Java package names.
    // When this flag is enabled, they will be replaced by a dot. By default, they will be replaced with an underscore.
    // Default: false
    replaceDashesWithDot.set(true)
}
Groovy
plugins {
    id 'com.gradleup.auto.manifest' version '<latest-version>'
}

autoManifest {
    // Mandatory packageName
    packageName = 'com.company.example'

    // Applies recursively to sub-modules so you don't have to
    // Sub-module package names will be auto generated by using their relative path
    // Default: true
    applyRecursively = true
    
    // Using dashes `-` is pretty common in module names. But they are not allowed within Java package names.
    // When this flag is enabled, they will be replaced by a dot. By default, they will be replaced with an underscore.
    // Default: false
    replaceDashesWithDot = true
}

Ta-da 🎉 Now just put your Java/Kotlin files and don't worry about the rest.

Nested Modules

To make it easy for you applyRecursively is enabled by default. This will automatically generate AndroidManifest.xml for you in all modules recursively. You have 2 options to override:

  • If you need more info like permissions, Activity definitions, you can continue to have your AndroidManifest.xml and recursive generation will be skipped for that module.
  • If you need to override, you can apply the plugin again in a nested Gradle module and provide a custom packageName

Performance

  • This project uses Gradle's Lazy Task Configuration APIs and do not cause eager task creation in AGP.
  • It generates the AndroidManifest.xml file lazily. That means "zero" impact on Gradle configuration times.
  • It supports build cache so that the files are generated only once and re-used across builds.

Sample App

Checkout the sample app with multi-modules where only the Application module defines AndroidManifest.xml - available here

In Action

Here is the first integration into one of my apps: https://github.com/tasomaniac/OpenLinkWith/commit/5b4029e922c33816fde67400e6c1ac40e015c9b9

Plugin is added in couple of lines and many AndroidManifest.xml files are removed. 🎉

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].