apply plugin: "org.gradle.java-platform"
/*
 * Root project configuration that is reused by subprojects to apply the Xtend compiler.
 */
if (!hasProperty('JENKINS_URL')) {
	ext.JENKINS_URL = 'https://ci.eclipse.org/xtext'
}

// The repositories to query when constructing the Xtend compiler classpath
repositories {
	mavenCentral()
	maven {
		name 'xtend-bootstrap'
		url "$JENKINS_URL/job/xtend-bootstrap/lastStableBuild/artifact/build-result/maven-repository/"
	}
}

configurations {
	xtendCompiler {
		description 'Bootstrap dependencies for the Xtend compiler'
		resolutionStrategy {
			eachDependency {
				if (requested.group == 'org.eclipse.xtext' || requested.group == 'org.eclipse.xtend')
					useVersion(versions.xtext_bootstrap)
			}
		}
		exclude group: 'asm'
	}
}

dependencies {
	xtendCompiler "org.eclipse.xtend:org.eclipse.xtend.core:${versions.xtext_bootstrap}"
	xtendCompiler "org.eclipse.xtext:org.eclipse.xtext.java:${versions.xtext_bootstrap}"
	xtendCompiler "org.eclipse.xtext:org.eclipse.xtext.smap:${versions.xtext_bootstrap}"
	xtendCompiler platform("org.eclipse.xtext:xtext-dev-bom:${versions.xtext_bootstrap}")
}
