Coder Social home page Coder Social logo

spring-projects's Introduction

spring-projects

spring-projects's People

Contributors

abitgen avatar

Watchers

 avatar

spring-projects's Issues

Migrate module to project, for use with Gradle composite builds

Composite builds in gradle mean that an already working gradle project can be used as dependency within our own project.
The main difference between a multi module project and composite build project is there is a single project build in a multi module build, i.e, only one root build.gradle and settings.gradle file, however in case of composite builds existing gradle projects can be imported from the gradle menu available in Intellij idea, making the project is completely independent at the same time imports as modules, if required these modules can be added as dependencies to our project.

More on using Composite builds is here
https://blog.jetbrains.com/idea/2017/03/webinar-recording-composite-builds-with-gradle

Create and configure a Sample subproject in gradle

Steps Taken

  1. Create a SubProject "spring-boot-start" having the gradle configuration from the spring-initializer. To create a subproject, right click the root project and select new module, select gradle module and proceed.

  2. Create allprojects block in the gradle file. Move dependencies, configurations to this block, so it is available to all the sub-projects, and itself under it.
    And apply needed plugins for use in sub-projects.
    image

  3. Including the projects in settings.gradle file located at root location.
    image

Building Library Management Application from the root project

As spring-boot-start module is now a separate project in the root project.
So now the root project dont have any subprojects.
The spring-boot-start project is now independent and no tasks of it can be run from this composite build setup.

Solution
So, to fix this, we will create a task in root project which delegates to the task of sub module in spring-boot-start project.

Sample Task in root build.gradle should look like this

task buildLibraryManagementApp {
    dependsOn gradle.includedBuild('spring-boot-start').task(':library-management-application:build')
}

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.