allprojects {
    apply plugin: 'java'
    apply plugin: 'build-dashboard'

    repositories  {
        mavenLocal()
        mavenCentral()
    }
    version = '0.0.1'
}

repositories  {
    mavenLocal()
    mavenCentral()
}

group = 'com.ibtp.kontor'

dependencies {
	compile 'org.jboss.spec.javax.faces:jboss-jsf-api_2.2_spec:+'
	compile 'org.hibernate.ogm:hibernate-ogm-mongodb:4.2.+'
    compile "ch.qos.logback:logback-classic:1.1.3"
    compile "org.slf4j:log4j-over-slf4j:1.7.13"
    compile "javax:javaee-api:7.0"
}

subprojects { project ->
    if (project.name.endsWith('Impl')) {
        apply plugin: 'checkstyle'
        apply plugin: 'findbugs'
        apply plugin: 'pmd'
        apply plugin: 'jacoco'
        dependencies {
            compile 'org.glassfish.main.ejb:javax.ejb:3.1.2.2'
            compile 'org.glassfish.main.transaction:javax.transaction:3.1.2.2'
            compile 'org.glassfish:javax.faces:2.1.6'
            compile 'org.eclipse.persistence:javax.persistence:2.1.0'
            compile 'org.eclipse.persistence:eclipselink:2.5.1'
            compile 'org.hibernate:hibernate-core:4.3.8.Final'
            compile 'org.hibernate:hibernate-entitymanager:4.3.8.Final'
            compile 'org.hsqldb:hsqldb:2.3.0'
            compile 'ch.qos.logback:logback-core:1.1.2'
            compile 'ch.qos.logback:logback-classic:1.1.2'
            testCompile 'org.glassfish.main.extras:glassfish-embedded-all:3.1.2.2'
            testCompile group: 'junit', name: 'junit', version: '4.11'
        }
        tasks.withType(Checkstyle) {
            ignoreFailures = true
            showViolations = false
            reports {
                xml.enabled true
            }
        }
        tasks.withType(FindBugs) {
            reports {
                xml.enabled true
            }
        }
        pmd {
            ignoreFailures = true
        }
        build.dependsOn(['jacocoTestReport'])
    }
}

wrapper {
    gradleVersion = '3.3'
}

