GithubHelp home page GithubHelp logo

gradle-plugin-classycle's Introduction

gradle-plugin-classycle

This is a gradle plugin for the java classycle dependency checker. The current version works with the latest stable version 1.4.2 from the original homepage.

This plugin needs the gradle javaPlugin to be loaded first.

Per default this plugin expects a dependency definition file at etc/classycle/dependencies.ddf and creates a gradle task classycleMain for the main java sourceSet.

Of course you can set the location of the definition file and scan other sourceSets as well (see usage-section below).

For every sourceSet specified this plugin will create its own task, named classycle<>SourceSetName<>. These tasks depend on the execution of the related "classes" task (e.g. classycleMain depends classes and classycleTest depends testClasses).

For convenience reasons an additional task classycle is created which executes every single sourceSet-specific classycle task.

The Java check task is altered and depends on the classycle task.

Usage

plugins {
    id 'java'
    id 'de.otto.classycle' version '1.4'
}

// if you want to override the default config, otherwise you can omit this section
classycleConfig {
    definitionFile = 'etc/classycle/dependencies.ddf'
    sourceSets = [project.sourceSets.main]
}

Example definition file

A definition file for a spring-boot based microserive might look like this

# Base packages
#----------------------------------------------
{root} = com.example.project.root.package.path
[root] = ${root}.*

# Independence of Architecture-Layers
#----------------------------------------------
[domain] = ${root}.domain.*
[service] = ${root}.service.*
[web] = ${root}.web.*

check sets [domain] [service] [web]

check [domain] independentOf [service]
check [domain] independentOf [web]

check [service] independentOf [web]

Acknowledgments

The Classycle Dependency Checker was created by Franz-Josef Elmer. Read more about it at http://classycle.sourceforge.net/.

This plugin was insprired by the Classycle Gradle Plugin by Konrad Garus https://github.com/konrad-garus/classycle-gradle-plugin

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.