I want to deploy my spring app on google app engine but i got this error message :
Execution failed for task ':appengineDeploy'.
> Deployment projectId must be defined or configured to read from system state
1. Set appengine.deploy.projectId = 'my-project-id'
2. Set appengine.deploy.projectId = 'GCLOUD_CONFIG' to use project from gcloud config.
3. Using appengine.deploy.projectId = 'APPENGINE_CONFIG' has been deprecated.
google cloud sdk and app engine tools are already installed on my laptop.
i searched on the internet and i found that i must put the project ID in gradle file :
appengine {
deploy {
projectId = "my-project-id"
}
}
but the problem is that gradle can not resoble all of these properties.
is there a problem with my gradle file that may caused this problem?
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
buildscript {
dependencies {
classpath("com.google.cloud.tools:appengine-gradle-plugin:2.1.0")
}
}
plugins {
id("org.springframework.boot") version "2.2.0.M4"
id("io.spring.dependency-management") version "1.0.7.RELEASE"
kotlin("jvm") version "1.3.31"
kotlin("plugin.spring") version "1.3.31"
}
apply(plugin = "com.google.cloud.tools.appengine")
group = "com.demo.app"
version = "1.0"
java.sourceCompatibility = JavaVersion.VERSION_1_8
repositories {
mavenCentral()
maven { url = uri("https://repo.spring.io/snapshot") }
maven { url = uri("https://repo.spring.io/milestone") }
}
extra["springCloudVersion"] = "Hoxton.M1"
dependencies {
implementation("org.jetbrains.kotlin:kotlin-reflect")
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
implementation("org.springframework.cloud:spring-cloud-starter-netflix-eureka-server")
implementation("org.springframework.boot:spring-boot-starter-web")
testImplementation("org.springframework.boot:spring-boot-starter-test") {
exclude(group = "org.junit.vintage", module = "junit-vintage-engine")
exclude(group = "junit", module = "junit")
}
}
dependencyManagement {
imports {
mavenBom("org.springframework.cloud:spring-cloud-
dependencies:${property("springCloudVersion")}")
}
}
tasks.withType<Test> {
useJUnitPlatform()
}
tasks.withType<KotlinCompile> {
kotlinOptions {
freeCompilerArgs = listOf("-Xjsr305=strict")
jvmTarget = "1.8"
}
}