Giriş
Bu task ile gradle wrapper dosyaları oluşturulur. Gradle wrapper kullanmanın iyi yanları şöyle
The Gradle wrapper is a script you add to your Gradle project and use to execute your build. The advantages are:- you don’t need to have Gradle installed on your machine to build the project- the wrapper guarantees you’ll be using the version of Gradle required by the project- you can easily update the project to a newer version of Gradle, and push those changes to version control so other team members use the newer version
Açıklaması şöyle
By default the Gradle wrapper created by running gradle init or gradle wrapper will use the version of Gradle installed on your machine.
Örnek
Şöyle yaparız
gradle init
4 tane dosya oluşturulur. Bu dosyaları git'e commitlemek gerekir. Dosyalar şöyle
gradle-wrapper.jar code required for downloading the correct Gradle version when you run the buildgradle-wrapper.properties file to configure the wrapper’s properties such as the Gradle versiongradlew a shell script for executing the build on Linuxgradlew.bat a script for executing the build on Windows
Dosya şöyle
$ cat gradle/wrapper/gradle-wrapper.properties distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists distributionUrl=https\://services.gradle.org/distributions/gradle-6.9-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists
Örnek - Create a Gradle project
Açıklaması şöyle
gradle initYou’ll be asked several questions. Here are the values that I used for my project.Select type of project to generate: applicationSelect implementation language: javaSplit functionality across multiple subprojects?: noSelect build script DSL: KotlinGenerate build using new APIs and behavior: yesSelect test framework: JUnit JupyterProject name: apachebeamtrainingSource package: apachebeamtraining
Hiç yorum yok:
Yorum Gönder