How to declare gradle version 5.0 in build.gradle?
I used task wrapper when Gradle was 4.x but when I change gradleVersion to 5.0 , gradle wrapper states that it can't add a task with the same name. This didn't happen when it was 4.x when I could just change from 4.8 to 4.9 without issues. Does Gradle changed how task wrapper works?
gradle build.gradle
add a comment |
I used task wrapper when Gradle was 4.x but when I change gradleVersion to 5.0 , gradle wrapper states that it can't add a task with the same name. This didn't happen when it was 4.x when I could just change from 4.8 to 4.9 without issues. Does Gradle changed how task wrapper works?
gradle build.gradle
The only clue that I've found iswrapper { distributionType = Wrapper.DistributionType.ALL }
– Arkyo
Nov 28 '18 at 14:27
add a comment |
I used task wrapper when Gradle was 4.x but when I change gradleVersion to 5.0 , gradle wrapper states that it can't add a task with the same name. This didn't happen when it was 4.x when I could just change from 4.8 to 4.9 without issues. Does Gradle changed how task wrapper works?
gradle build.gradle
I used task wrapper when Gradle was 4.x but when I change gradleVersion to 5.0 , gradle wrapper states that it can't add a task with the same name. This didn't happen when it was 4.x when I could just change from 4.8 to 4.9 without issues. Does Gradle changed how task wrapper works?
gradle build.gradle
gradle build.gradle
edited Nov 29 '18 at 13:37
M.Ricciuti
3,7102420
3,7102420
asked Nov 28 '18 at 14:14
ArkyoArkyo
247
247
The only clue that I've found iswrapper { distributionType = Wrapper.DistributionType.ALL }
– Arkyo
Nov 28 '18 at 14:27
add a comment |
The only clue that I've found iswrapper { distributionType = Wrapper.DistributionType.ALL }
– Arkyo
Nov 28 '18 at 14:27
The only clue that I've found is
wrapper { distributionType = Wrapper.DistributionType.ALL }– Arkyo
Nov 28 '18 at 14:27
The only clue that I've found is
wrapper { distributionType = Wrapper.DistributionType.ALL }– Arkyo
Nov 28 '18 at 14:27
add a comment |
1 Answer
1
active
oldest
votes
Defining a custom wrapper task in your build script has been deprecated since Gradle 4.8 version, see Gradle 4.8 depreciations (section Overwriting Gradle's built-in tasks" section)
Since version 4.8 (and before 5.0) you should have a warning message as below if you still define a custom wrapper task:
$ ./gradlew clean --warning-mode all
> Configure project :
Creating a custom task named 'wrapper' has been deprecated and is scheduled to be removed in Gradle 5.0.
You can configure the existing task using the
'wrapper { }' syntax or create your custom task under a different
name.'.
As announced, the support for custom wrapper task has been removed in Gradle 5.0, so you need to use the new way for configuring the Wrapper:
// Configuring the wrapper, the old way (gradle < 4.8 )
// see https://docs.gradle.org/4.4/userguide/gradle_wrapper.html#sec:wrapper_generation
task wrapper(type: Wrapper) {
gradleVersion = '4.4'
distributionType = Wrapper.DistributionType.BIN
}
// Configuring the wrapper, the new way (since Gradle 4.8)
// see https://docs.gradle.org/current/userguide/gradle_wrapper.html#customizing_wrapper
wrapper{
gradleVersion = '5.1'
distributionType = Wrapper.DistributionType.BIN
}
gradleVersion = 4.9should begradleVersion = '4.9'
– Galley
Jan 7 at 9:52
You're right, tks. I updated.
– M.Ricciuti
Jan 18 at 14:30
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53521437%2fhow-to-declare-gradle-version-5-0-in-build-gradle%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Defining a custom wrapper task in your build script has been deprecated since Gradle 4.8 version, see Gradle 4.8 depreciations (section Overwriting Gradle's built-in tasks" section)
Since version 4.8 (and before 5.0) you should have a warning message as below if you still define a custom wrapper task:
$ ./gradlew clean --warning-mode all
> Configure project :
Creating a custom task named 'wrapper' has been deprecated and is scheduled to be removed in Gradle 5.0.
You can configure the existing task using the
'wrapper { }' syntax or create your custom task under a different
name.'.
As announced, the support for custom wrapper task has been removed in Gradle 5.0, so you need to use the new way for configuring the Wrapper:
// Configuring the wrapper, the old way (gradle < 4.8 )
// see https://docs.gradle.org/4.4/userguide/gradle_wrapper.html#sec:wrapper_generation
task wrapper(type: Wrapper) {
gradleVersion = '4.4'
distributionType = Wrapper.DistributionType.BIN
}
// Configuring the wrapper, the new way (since Gradle 4.8)
// see https://docs.gradle.org/current/userguide/gradle_wrapper.html#customizing_wrapper
wrapper{
gradleVersion = '5.1'
distributionType = Wrapper.DistributionType.BIN
}
gradleVersion = 4.9should begradleVersion = '4.9'
– Galley
Jan 7 at 9:52
You're right, tks. I updated.
– M.Ricciuti
Jan 18 at 14:30
add a comment |
Defining a custom wrapper task in your build script has been deprecated since Gradle 4.8 version, see Gradle 4.8 depreciations (section Overwriting Gradle's built-in tasks" section)
Since version 4.8 (and before 5.0) you should have a warning message as below if you still define a custom wrapper task:
$ ./gradlew clean --warning-mode all
> Configure project :
Creating a custom task named 'wrapper' has been deprecated and is scheduled to be removed in Gradle 5.0.
You can configure the existing task using the
'wrapper { }' syntax or create your custom task under a different
name.'.
As announced, the support for custom wrapper task has been removed in Gradle 5.0, so you need to use the new way for configuring the Wrapper:
// Configuring the wrapper, the old way (gradle < 4.8 )
// see https://docs.gradle.org/4.4/userguide/gradle_wrapper.html#sec:wrapper_generation
task wrapper(type: Wrapper) {
gradleVersion = '4.4'
distributionType = Wrapper.DistributionType.BIN
}
// Configuring the wrapper, the new way (since Gradle 4.8)
// see https://docs.gradle.org/current/userguide/gradle_wrapper.html#customizing_wrapper
wrapper{
gradleVersion = '5.1'
distributionType = Wrapper.DistributionType.BIN
}
gradleVersion = 4.9should begradleVersion = '4.9'
– Galley
Jan 7 at 9:52
You're right, tks. I updated.
– M.Ricciuti
Jan 18 at 14:30
add a comment |
Defining a custom wrapper task in your build script has been deprecated since Gradle 4.8 version, see Gradle 4.8 depreciations (section Overwriting Gradle's built-in tasks" section)
Since version 4.8 (and before 5.0) you should have a warning message as below if you still define a custom wrapper task:
$ ./gradlew clean --warning-mode all
> Configure project :
Creating a custom task named 'wrapper' has been deprecated and is scheduled to be removed in Gradle 5.0.
You can configure the existing task using the
'wrapper { }' syntax or create your custom task under a different
name.'.
As announced, the support for custom wrapper task has been removed in Gradle 5.0, so you need to use the new way for configuring the Wrapper:
// Configuring the wrapper, the old way (gradle < 4.8 )
// see https://docs.gradle.org/4.4/userguide/gradle_wrapper.html#sec:wrapper_generation
task wrapper(type: Wrapper) {
gradleVersion = '4.4'
distributionType = Wrapper.DistributionType.BIN
}
// Configuring the wrapper, the new way (since Gradle 4.8)
// see https://docs.gradle.org/current/userguide/gradle_wrapper.html#customizing_wrapper
wrapper{
gradleVersion = '5.1'
distributionType = Wrapper.DistributionType.BIN
}
Defining a custom wrapper task in your build script has been deprecated since Gradle 4.8 version, see Gradle 4.8 depreciations (section Overwriting Gradle's built-in tasks" section)
Since version 4.8 (and before 5.0) you should have a warning message as below if you still define a custom wrapper task:
$ ./gradlew clean --warning-mode all
> Configure project :
Creating a custom task named 'wrapper' has been deprecated and is scheduled to be removed in Gradle 5.0.
You can configure the existing task using the
'wrapper { }' syntax or create your custom task under a different
name.'.
As announced, the support for custom wrapper task has been removed in Gradle 5.0, so you need to use the new way for configuring the Wrapper:
// Configuring the wrapper, the old way (gradle < 4.8 )
// see https://docs.gradle.org/4.4/userguide/gradle_wrapper.html#sec:wrapper_generation
task wrapper(type: Wrapper) {
gradleVersion = '4.4'
distributionType = Wrapper.DistributionType.BIN
}
// Configuring the wrapper, the new way (since Gradle 4.8)
// see https://docs.gradle.org/current/userguide/gradle_wrapper.html#customizing_wrapper
wrapper{
gradleVersion = '5.1'
distributionType = Wrapper.DistributionType.BIN
}
edited Jan 18 at 14:30
answered Nov 29 '18 at 13:34
M.RicciutiM.Ricciuti
3,7102420
3,7102420
gradleVersion = 4.9should begradleVersion = '4.9'
– Galley
Jan 7 at 9:52
You're right, tks. I updated.
– M.Ricciuti
Jan 18 at 14:30
add a comment |
gradleVersion = 4.9should begradleVersion = '4.9'
– Galley
Jan 7 at 9:52
You're right, tks. I updated.
– M.Ricciuti
Jan 18 at 14:30
gradleVersion = 4.9 should be gradleVersion = '4.9'– Galley
Jan 7 at 9:52
gradleVersion = 4.9 should be gradleVersion = '4.9'– Galley
Jan 7 at 9:52
You're right, tks. I updated.
– M.Ricciuti
Jan 18 at 14:30
You're right, tks. I updated.
– M.Ricciuti
Jan 18 at 14:30
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53521437%2fhow-to-declare-gradle-version-5-0-in-build-gradle%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
The only clue that I've found is
wrapper { distributionType = Wrapper.DistributionType.ALL }– Arkyo
Nov 28 '18 at 14:27