buildscript {
	repositories {
		mavenLocal()
		mavenCentral()
	}
	dependencies {
		classpath "com.jtransc:jtransc-gradle-plugin:$jtranscVersion"
	}
}

apply plugin: "java"
apply plugin: 'application'
apply plugin: "jtransc"

mainClassName = "Benchmark"
//mainClassName = "org.junit.runner.JUnitCore"

sourceSets.main {
	java { srcDirs = ['src'] }
	resources { srcDirs = ['resources'] }
}
sourceSets.test {
	java { srcDirs = ['test'] }
	resources { srcDirs = ['testresources'] }
}

repositories {
	mavenLocal()
	mavenCentral()
}

dependencies {
	compile "com.jtransc:jtransc-annotations:$jtranscVersion"
	compile "com.jtransc:jtransc-rt-core:$jtranscVersion"
	//implementation "junit:junit:4.12"
	testImplementation "junit:junit:4.12"
}

jtransc {
	//minimizeNames = true
	minimizeNames = false
	treeshaking = true
	relooper = true

	// Call ./gradlew -Pjs_enable_async=true runJs
	if (rootProject.findProperty("js_enable_async")?.toString()?.toBoolean() ?: false) {
		param("js_enable_async", "true")
	}
}
