/*
================================================================================
build_ctxbasicrobot.gradle
GENERATED ONLY ONCE
================================================================================
*/
plugins {
    // Apply the application plugin to add support for building a CLI application in Java.
    id 'application'
    id 'java'
    id 'eclipse'
}

version '1.0'
sourceCompatibility = 1.8

java {
    toolchain.languageVersion.set(JavaLanguageVersion.of(17))
}

repositories {
    // Use Maven Central for resolving dependencies.
    mavenCentral()
    flatDir {   dirs '../unibolibs'	 }
}

dependencies {
    /* JSON **************************************************************************************************************** */
    implementation 'com.googlecode.json-simple:json-simple:1.1.1'

    /* AIMA **************************************************************************************************************** */
    implementation group: 'com.googlecode.aima-java', name: 'aima-core', version: '3.0.0'
    /* UNIBO *************************************************************************************************************** */
    implementation name: 'unibo.basicomm23-1.0'
}

sourceSets {
    main.java.srcDirs += 'src'
    main.java.srcDirs += 'src/main/java'
    main.java.srcDirs += 'src/main/kotlin'
    main.java.srcDirs += 'src/main/resources'
    test.java.srcDirs += 'src/main/java/test'		//test is specific
    test.java.srcDirs += 'src/main/kotlin/test'
}
  

eclipse {
    classpath {
        sourceSets -= [sourceSets.main, sourceSets.test]	
    }	
 }


application {
    // Define the main class for the application.
    mainClass = 'main.java.MainPLannerdemo'
}

 jar {
    println("building jar")
    from sourceSets.main.allSource
    duplicatesStrategy(DuplicatesStrategy.EXCLUDE)  //per via di locgback.xml quando si usa spring
    manifest {
        attributes 'Main-Class': "$mainClassName"
    }
}
