Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update gradle syntax to support both .gradle and .gradle.kts #3801

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ZZZank
Copy link

@ZZZank ZZZank commented Dec 23, 2024

.gradle.kts, unlike .gradle, is using Kotlin instead of Groovy as the base of its scripting language. The old syntax is problematic in .gradle.kts becasue:

  • Kotlin string cannot be wrapped by single quote, aka 'some string' is not allowed and should be "some string" instead
  • Kotlin requires brackets for method calling, aka f someArg is not allowed and should be f(someArg) instead

So I made some changes to the syntax so that the installation guide is valid for both .gradle.kts, unlike .gradle

build.gradle.kts:
example-kotlin

build.gradle:
example-groovy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant