You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: TRYLATESTBITSINPROD.md
+84Lines changed: 84 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -278,3 +278,87 @@ sed -i '/<\/plugins>/i \
278
278
echo"Updated $POM_FILE"
279
279
```
280
280
281
+
282
+
## For the Gradle build system
283
+
284
+
If you are using the Gradle build system, you can apply the following changes to your build script.
285
+
286
+
These instructions configure the `war` task to do two important things:
287
+
1.**Move the jars to the top of the WAR directory:** The `into("")` (or `into('.')`) block combined with `eachFile { path = name }` extracts the jars and flattens the directory structure, placing them directly in the root of the generated WAR.
288
+
2.**Rename the jars:** The `rename` block strips the version string (e.g., `-5.0.1-SNAPSHOT`) from the extracted jars so their names exactly match the `-Djava.class.path=runtime-main.jar` argument specified in the `appengine-web.xml` entrypoint.
289
+
290
+
### Kotlin
291
+
```
292
+
import org.gradle.api.tasks.bundling.War
293
+
294
+
// 1. Define the target runtime version
295
+
val gaeRuntimeVersion = "5.0.1-SNAPSHOT" // Change this to your desired version
296
+
297
+
// 2. Create a custom configuration for the runtime zip
298
+
val gaeRuntimeZip by configurations.creating
299
+
300
+
dependencies {
301
+
// 3. Declare the dependency on the App Engine runtime deployment zip
0 commit comments