buildscript {
	repositories {
		maven { url 'https://maven.aliyun.com/nexus/content/groups/public/'}
	}
}

plugins {
	id 'java'
	id 'com.google.cloud.tools.jib' version "${jibGradlePluginVersion}"
	id 'org.springframework.boot' version "${springBootVersion}"
}

apply plugin: 'com.google.cloud.tools.jib'

description = "maxkey-web-maxkey"

//docker
jib {
	from {
		image = "${jibFromImage}"
		platforms {
			platform {
				architecture = 'amd64'
				os = 'linux'
			}
			platform {
				architecture = 'arm64'
				os = 'linux'
			}
		}
	}
	to {
		//https://registry.hub.docker.com/repository/docker/maxkeytop/maxkey
		image = "${jibToImage}/maxkey"
		tags = ["${project.version}".toString(), 'latest']
		auth {
			username = "${jibToAuthUsername}"
			password = "${jibToAuthPassword}"
		}
	}
	container {
		mainClass 	= "org.dromara.maxkey.MaxKeyApplication"
		jvmFlags 	= ['-Dfile.encoding=utf-8', '-Dserver.port=9527','-Duser.timezone=Asia/Shanghai']
		ports 		= ['9527']
	}
}


//build.configure { finalizedBy jib }

dependencies {
	implementation project(":maxkey-common")
	implementation project(":maxkey-core")
	implementation project(":maxkey-persistence")
   	
   	implementation project(":maxkey-authentications:maxkey-authentication-core")
   	implementation project(":maxkey-authentications:maxkey-authentication-social")
   	implementation project(":maxkey-authentications:maxkey-authentication-captcha")
   	implementation project(":maxkey-authentications:maxkey-authentication-otp")
	implementation project(":maxkey-authentications:maxkey-authentication-provider")
	implementation project(":maxkey-authentications:maxkey-authentication-sms")
   	
   	implementation project(":maxkey-protocols:maxkey-protocol-authorize")
   	implementation project(":maxkey-protocols:maxkey-protocol-cas")
	implementation project(":maxkey-protocols:maxkey-protocol-extendapi")
	implementation project(":maxkey-protocols:maxkey-protocol-formbased")
	implementation project(":maxkey-protocols:maxkey-protocol-tokenbased")
   	implementation project(":maxkey-protocols:maxkey-protocol-oauth-2.0")
   	implementation project(":maxkey-protocols:maxkey-protocol-saml-2.0")
	implementation project(":maxkey-protocols:maxkey-protocol-jwt")
	
}