Code Monkey home page Code Monkey logo

com.github.ptkltm.development.recursiveinclude.gradleplugin's Introduction

Recursive Include Plugin

Gradle Plugin for the settings.gradle(.kts) file that automatically includes nested sub builds and sub projects.

Implementation description

Declares the name of the root directory as project name and recursively searches for 'settings.gradle', 'settings.gradle.kts', 'build.gradle' and 'build.gradle.kts' files in the root directory.

All invisible files (starting with '.') or files contained in a directory called 'build' are ignored.

If a 'settings.gradle' or 'settings.gradle.kts' file is detected, the relative path to the root directory of the file is automatically applied as composite build via the composite build api of Gradle.

If no 'settings.gradle' or 'settings.gradle.kts' files are available, but a 'build.gradle' or 'build.gradle.kts' file was found, the relative path of the root directory of that file is automatically applied as sub project via the include instruction of Gradle's sub projects api. The name of the sub project is set to the name of the directory where the 'build.gradle' or 'build.gradle.kts' file is located.

After one of the four files - 'settings.gradle', 'settings.gradle.kts', 'build.gradle' or 'build.gradle.kts' - was found, the recursive search at the current path is stopped.

Current Version

Download

Usage

The plugin with the id 'com.github.ptkltm.development.recursiveinclude' is hosted at Bintray and can be applied via the following configurations to either a settings.gradle.kts or a settings.gradle file.

  • Configuration of a settings.gradle.kts file:
buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath(
            group = "com.github.ptkltm.development.recursiveinclude.gradleplugin",
            name = "com.github.ptkltm.development.recursiveinclude.gradleplugin",
            version = "0.4.0"
        )
    }
}

apply(plugin = "com.github.ptkltm.development.recursiveinclude")
  • Configuration of a settings.gradle file:
buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.github.ptkltm.development.recursiveinclude.gradleplugin:com.github.ptkltm.development.recursiveinclude.gradleplugin:0.4.0'
    }
}

apply plugin: 'com.github.ptkltm.development.recursiveinclude'

Building the source code

  • git clone https://github.com/ptkltm/com.github.ptkltm.development.recursiveinclude.gradleplugin.git
  • cd com.github.ptkltm.development.recursiveinclude.gradleplugin
  • ./gradlew (on Linux or macOS) / gradlew.bat (on Windows)

License information

Copyright [yyyy] [name of copyright owner]

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

com.github.ptkltm.development.recursiveinclude.gradleplugin's People

Contributors

ptkltm avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

liphis

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.