import org.apache.tools.ant.filters.ReplaceTokens

dependencies {
	compile project(':wicked-charts-showcase-options')
	compile 'commons-io:commons-io:2.4'
	compile group: 'org.apache.wicket', name: 'wicket-extensions', version: "${wicket_version}"
	compile(
			[group: 'org.apache.wicket', name: 'wicket-spring', version: "${wicket_version}"],
			[group: 'de.adesso.wicked-charts', name: 'wicked-charts-wicket14', version: "${wickedcharts_version}"],
	)
	compile(
			[group: 'org.springframework.boot', name: 'spring-boot-starter-web', version: "${spring_boot_version}"],
	)
}

buildscript {
	repositories {
		mavenLocal()
		mavenCentral()
		maven {
			url "https://plugins.gradle.org/m2/"
		}
        jcenter()
	}
	dependencies {
		classpath group: 'org.springframework.boot', name: 'spring-boot-gradle-plugin', version: "${spring_boot_version}"
	}
}

apply plugin: 'war'
apply plugin: 'org.springframework.boot'

processResources {
	from 'src/main/java'
	from 'src/main/resources'
	filter(ReplaceTokens, tokens: [projectVersion : wickedcharts_version])
	filter(ReplaceTokens, tokens: [wicketVersion : wicket_version])
}

bootRun {
	// default application configuration for running application via bootRun in development mode
	// (in production, these properties are defined in application.properties)
	jvmArgs '-Xdebug',
			'-Dserver.port=8080',
			'-Dwicket.configurationType=DEVELOPMENT',
			'-Dspring.jpa.hibernate.ddl-auto=update'
}

appengine {  // App Engine tasks configuration
	deploy {   // deploy configuration
		version = "staging" //replaces the previous version with the current one, so I don't have to remove instances manually
		stopPreviousVersion = true
		promote = true
	}
}















