Layout folding

Plugin that injects a task to allow multiple folders in the layout folder of an android project.

License

License

GroupId

GroupId

com.github.droidpl
ArtifactId

ArtifactId

lfolding
Last Version

Last Version

1.0
Release Date

Release Date

Type

Type

jar
Description

Description

Layout folding
Plugin that injects a task to allow multiple folders in the layout folder of an android project.
Project URL

Project URL

https://github.com/droidpl/AndroidLayoutFolding
Source Code Management

Source Code Management

https://github.com/droidpl/AndroidLayoutFolding

Download lfolding

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.droidpl/lfolding/ -->
<dependency>
    <groupId>com.github.droidpl</groupId>
    <artifactId>lfolding</artifactId>
    <version>1.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.droidpl/lfolding/
implementation 'com.github.droidpl:lfolding:1.0'
// https://jarcasting.com/artifacts/com.github.droidpl/lfolding/
implementation ("com.github.droidpl:lfolding:1.0")
'com.github.droidpl:lfolding:jar:1.0'
<dependency org="com.github.droidpl" name="lfolding" rev="1.0">
  <artifact name="lfolding" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.droidpl', module='lfolding', version='1.0')
)
libraryDependencies += "com.github.droidpl" % "lfolding" % "1.0"
[com.github.droidpl/lfolding "1.0"]

Dependencies

compile (1)

Group / Artifact Type Version
com.android.tools.build : gradle jar 1.5.0

Project Modules

There are no modules declared in this project.

Android Layout Folding

Android plugin Gradle Download

Gradle plugin for Android that allows a project to define folders inside the layout directory. Basically it uses the normal merging mechanism that the android plugin uses by itself, declaring the folders recursively as resources directory.

Take the following structure as an example:

src/main/res/layout/
    myLayout.xml
    activities/layout/
        activity1.xml
        activity2.xml
src/debug/res/layout/
    activities/layout/
        activity1.xml

As you may notice it also supports different build variants, flavours and dimensions.

Instructions

Add the plugin to the classpath of your root build.gradle:

buildscript {
    dependencies {
        classpath 'com.github.droidpl:lfolding:1.0'
    }
}

Apply this plugin to the build.gradle your project:

apply plugin: "lfolding"

This will enable the behaviour automatically.

How to add folders

Under your original layout folder, if you want to add some nested folders keep in mind you have to add a new layout folder inside of it. It also supports any other resource and all of them will be merged during the build process.

Example for an activity folder:

src/main/layout/
    activities/layout
        myActivity.xml

License

The MIT License (MIT)
Copyright (c) 2016 Javier de Pedro López

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Versions

Version
1.0