buildscript {
	ext {
		springBootVersion = '2.1.0.RELEASE'
	}
	repositories {
		mavenCentral()
	}
	dependencies {
		classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")		

	}
}

plugins {
	id 'java'
	id 'eclipse'
	id "org.springframework.boot" version "2.1.6.RELEASE"
	id "io.spring.dependency-management" version "1.0.8.RELEASE"
}

group = 'com.monoToMicro'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = 1.8

bootJar {
    launchScript()
}

repositories {
  mavenCentral()
}

dependencies {
    
    //Spring config
    implementation('org.springframework.boot:spring-boot-starter-web')
	testImplementation('org.springframework.boot:spring-boot-starter-test')
	implementation("org.springframework.boot:spring-boot-devtools")
	implementation group: 'org.springframework.boot', name: 'spring-boot-starter-security', version: '2.1.1.RELEASE'
	implementation("org.springframework.boot:spring-boot-starter-actuator")
	implementation group: 'org.springframework.security.oauth.boot', name: 'spring-security-oauth2-autoconfigure'//, version: '2.1.1.RELEASE'
	implementation group: 'org.springframework.security', name: 'spring-security-jwt', version: '1.0.9.RELEASE'
	implementation group: 'org.springframework.cloud', name: 'spring-cloud-starter-oauth2', version: '2.0.1.RELEASE'
	implementation group: 'org.springframework', name: 'spring-tx'//, version: '2.5.4'
	implementation group: 'org.springframework', name: 'spring-jdbc'//, version: '3.2.1.RELEASE'
	implementation group: 'org.springframework.security', name: 'spring-security-crypto', version: '5.1.2.RELEASE'
    
    //apache commons
    //compile 'commons-fileupload:commons-fileupload:1.2'
    //compile 'commons-io:commons-io:2.4'
    //compile group: 'commons-codec', name: 'commons-codec', version: '1.11'
    
    //added mybatis for spring
	implementation 'org.mybatis:mybatis-spring:1.2.2'
	implementation 'org.mybatis:mybatis:3.2.2'

    //added jaxb
	implementation("javax.xml.bind:jaxb-api:2.3.0")
	implementation("com.sun.xml.bind:jaxb-core:2.2.11")
	implementation("com.sun.xml.bind:jaxb-impl:2.2.11")
    
    //added jackson    
    //compile 'com.fasterxml.jackson.datatype:jackson-datatype-joda:2.9.8'
    
    //added my sql 
	implementation 'mysql:mysql-connector-java:8.0.11'
	implementation('org.springframework.boot:spring-boot-starter-jdbc')
    
    //added geo pack
    //compile 'com.javadocmd:simplelatlng:1.3.0'
    
    //added joda time
    //compile 'joda-time:joda-time:2.3'
    
    //added mail
	implementation  'javax.mail:mail:1.4.7'
    
    //AWS SDK
	implementation  'com.amazonaws:aws-java-sdk:1.11.567'
	implementation  'com.amazonaws:aws-java-sdk-s3:1.11.567'
	implementation  'com.amazonaws:aws-java-sdk-core:1.11.567'
	implementation group: 'com.amazonaws', name: 'aws-java-sdk-osgi', version: '1.11.567'
    
    //runtime 'com.javadocmd:simplelatlng:1.3.0'
}

task unpack(type: Copy) {
    dependsOn bootJar
    from(zipTree(tasks.bootJar.outputs.files.singleFile))
    into("build/dependency")
}

/*docker {
    name "${project.group}/${bootJar.baseName}"
    copySpec.from(tasks.unpack.outputs).into("dependency")
    buildArgs(['DEPENDENCY': "dependency"])
}*/
