GoogleCloudPlatform / app-gradle-plugin

The library has moved to https://github.com/GoogleCloudPlatform/appengine-plugins/tree/main/app-gradle-plugin
Apache License 2.0
153 stars 40 forks source link

Can't use project variable in project definition #353

Closed glaforge closed 2 years ago

glaforge commented 5 years ago

https://github.com/GoogleCloudPlatform/app-gradle-plugin/blob/7801515f7f7e1f895552f770efac77ee94c13510/src/main/java/com/google/cloud/tools/gradle/appengine/core/DeployExtension.java#L140

Because of this line to suggest users to upgrade their gradle build to use projectId instead of project, it's impossible to do the following:

appengine {
    stage.artifact = "${buildDir}/libs/${project.name}-${project.version}-all.jar"
    deploy {
        projectId = project.name
        version = project.version.replaceAll('.', '_')
    }
}

In stage.artifact I can use ${project.name} without a problem. But in the deploy section, I can't use Gradle's project variable because you override the getProject() method.

JoeWang1127 commented 2 years ago

close as not planned. Please re-open if it's still relevant.