buildscript {
    

    repositories {
        mavenLocal()
        mavenCentral()
        maven { url "https://plugins.gradle.org/m2/" }
        maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
        maven { url "https://jitpack.io" }
        jcenter()
        google()
    }
    dependencies {

    }
}

allprojects {

    group = 'space.earlygrey'
    version = 'local-SNAPSHOT'

    ext {
        appName = "shapedrawer"
        gdxVersion = '1.9.10'
        roboVMVersion = '2.3.7'
        box2DLightsVersion = '1.4'
        ashleyVersion = '1.7.0'
        aiVersion = '1.8.0'
    }

    repositories {
        mavenLocal()
        mavenCentral()
        jcenter()
        google()
        maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
        maven { url "https://oss.sonatype.org/content/repositories/releases/" }
    }
}

if(JavaVersion.current().isJava9Compatible()) {
    compileJava.targetCompatibility = 8
    allprojects {
        tasks.withType(JavaCompile) {
            options.release.set(8)
        }
    }
}


project(":drawer") {
    apply plugin: "java-library"
    apply plugin: 'maven'

    dependencies {
        api "com.badlogicgames.gdx:gdx:$gdxVersion"
    }

    task sourcesJar(type: Jar, dependsOn: classes) {
        classifier = 'sources'
        from sourceSets.main.allSource
    }

    task javadocJar(type: Jar, dependsOn: javadoc) {
        classifier = 'javadoc'
        from javadoc.destinationDir
    }

    artifacts {
        archives sourcesJar
        archives javadocJar
    }
}

project(":test") {
    apply plugin: "java-library"

    dependencies {
        implementation project(":drawer")
        api "com.badlogicgames.gdx:gdx-backend-lwjgl:$gdxVersion"
        api "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop"
        
    }
}
