IDEA reports errors for ShadowJar task in build.gradle.kts, while ./gradlew run worksIntelliJ Error:Abnormal build process terminationIntellij abnormal build process terminationionic cordova build android Error with gradleIDEA reports errors in build.gradle.kts while command line gradle run succeedsWhy does Gradle ignore sourceSets and/or srcDir when dealing with proto files?Gradle: shadowJar leaves dependencies outset JVM memory limit for Jhipster application started by Gradle bootRunError:Kotlin: Unsupported plugin option: org.jetbrains.kotlin.android:enabled=true “reloaded”Jar File Does Not Run After IntelliJ Upgrade
Do you add your strength modifier once or twice to an unarmed strike?
Regular Expressions with `<` and `?` strange matches
How is underwater propagation of sound possible?
Make Interviewee Comfortable in Potentially Intimate Environment
Do the villains know Batman has no superpowers?
Is there any reason nowadays to use a neon indicator lamp instead of a LED?
Applications of mathematics in clinical setting
Is Zack Morris's 'time stop' ability in "Saved By the Bell" a supernatural ability?
Why are two-stroke engines nearly unheard of in aviation?
Madrid to London w/ Expired 90/180 days stay as US citizen
Are lay articles good enough to be the main source of information for PhD research?
Floating Point XOR
Audire, with accusative or dative?
Who are the people reviewing far more papers than they're submitting for review?
Wrap a js function with a fixed this arg
How does one calculate the distribution of the Matt Colville way of rolling stats?
Can Brexit be undone in an emergency?
As a discovery writer, how to complete unfinished novel (which is highly diverted from original plot ) after a time-gap
Integrability of log of distance function
Why are Fuji lenses more expensive than others?
Can I separate garlic into cloves for storage?
I reverse the source code, you negate the output!
What are the end bytes of *.docx file format
Removing rows containing NA in every column
IDEA reports errors for ShadowJar task in build.gradle.kts, while ./gradlew run works
IntelliJ Error:Abnormal build process terminationIntellij abnormal build process terminationionic cordova build android Error with gradleIDEA reports errors in build.gradle.kts while command line gradle run succeedsWhy does Gradle ignore sourceSets and/or srcDir when dealing with proto files?Gradle: shadowJar leaves dependencies outset JVM memory limit for Jhipster application started by Gradle bootRunError:Kotlin: Unsupported plugin option: org.jetbrains.kotlin.android:enabled=true “reloaded”Jar File Does Not Run After IntelliJ Upgrade
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I am using Kotlin DSL for gradle config.
./gradlew works fine, but IDEA still reports errors for ShadowJar in build.gradle.kts
Type argument is not within its bounds.
Expected:Task!
Found: ShadowJar
QUESTION:
Is there any alternative syntax for ShadowJar task that is OK for both gradle and IDEA?
git repo to reproduce the issue:
https://github.com/ludenus/gradle-kts-shadow-jar
build.gradle.kts:
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import org.gradle.api.tasks.testing.logging.TestLogEvent
plugins
kotlin("jvm") version "1.3.20"
id("com.github.johnrengelman.shadow") version "4.0.4"
application
group = "com.example"
version = "0.0.1"
repositories
jcenter()
mavenCentral()
val junitVersion = "5.4.0"
dependencies
implementation(kotlin("stdlib", "1.3.20"))
implementation("org.jetbrains.kotlin:kotlin-reflect:1.3.20")
compileClasspath("com.github.jengelman.gradle.plugins:shadow:4.0.4")
implementation("org.slf4j:slf4j-api:1.7.21")
implementation("ch.qos.logback:logback-core:1.2.3")
implementation("ch.qos.logback:logback-classic:1.2.3")
testImplementation("io.kotlintest:kotlintest-runner-junit5:3.3.1")
testImplementation("org.junit.jupiter:junit-jupiter-api:$junitVersion")
testImplementation("org.junit.jupiter:junit-jupiter-params:$junitVersion")
runtime("org.junit.jupiter:junit-jupiter-engine:$junitVersion")
application
mainClassName = "com.example.App"
val test by tasks.getting(Test::class)
useJUnitPlatform()
testLogging.showStandardStreams = true
testLogging.events = setOf(TestLogEvent.PASSED, TestLogEvent.FAILED, TestLogEvent.SKIPPED, TestLogEvent.STANDARD_OUT, TestLogEvent.STANDARD_ERROR)
tasks.withType<ShadowJar>
manifest
attributes["Implementation-Title"] = "Shadow Jar"
attributes["Implementation-Version"] = version
attributes["Main-Class"] = "com.example.App"
classifier = "jar-with-dependencies"
VERSIONS:
Gradle:
$ ./gradlew --version
------------------------------------------------------------
Gradle 5.2.1
------------------------------------------------------------
Build time: 2019-02-08 19:00:10 UTC
Revision: f02764e074c32ee8851a4e1877dd1fea8ffb7183
Kotlin DSL: 1.1.3
Kotlin: 1.3.20
Groovy: 2.5.4
Ant: Apache Ant(TM) version 1.9.13 compiled on July 10 2018
JVM: 1.8.0_201 (Oracle Corporation 25.201-b09)
OS: Linux 4.15.0-46-generic amd64
IDEA:
IntelliJ IDEA 2019.1 (Community Edition)
Build #IC-191.6183.87, built on March 27, 2019
JRE: 1.8.0_202-release-1483-b39 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Linux 4.15.0-46-generic
IDEA is configured to use gradle 'wrapper' task configuration.
OS
$ uname -a
Linux qa-pc 4.15.0-46-generic #49-Ubuntu SMP Wed Feb 6 09:33:07 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.2 LTS"
gradle intellij-idea kotlin
add a comment
|
I am using Kotlin DSL for gradle config.
./gradlew works fine, but IDEA still reports errors for ShadowJar in build.gradle.kts
Type argument is not within its bounds.
Expected:Task!
Found: ShadowJar
QUESTION:
Is there any alternative syntax for ShadowJar task that is OK for both gradle and IDEA?
git repo to reproduce the issue:
https://github.com/ludenus/gradle-kts-shadow-jar
build.gradle.kts:
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import org.gradle.api.tasks.testing.logging.TestLogEvent
plugins
kotlin("jvm") version "1.3.20"
id("com.github.johnrengelman.shadow") version "4.0.4"
application
group = "com.example"
version = "0.0.1"
repositories
jcenter()
mavenCentral()
val junitVersion = "5.4.0"
dependencies
implementation(kotlin("stdlib", "1.3.20"))
implementation("org.jetbrains.kotlin:kotlin-reflect:1.3.20")
compileClasspath("com.github.jengelman.gradle.plugins:shadow:4.0.4")
implementation("org.slf4j:slf4j-api:1.7.21")
implementation("ch.qos.logback:logback-core:1.2.3")
implementation("ch.qos.logback:logback-classic:1.2.3")
testImplementation("io.kotlintest:kotlintest-runner-junit5:3.3.1")
testImplementation("org.junit.jupiter:junit-jupiter-api:$junitVersion")
testImplementation("org.junit.jupiter:junit-jupiter-params:$junitVersion")
runtime("org.junit.jupiter:junit-jupiter-engine:$junitVersion")
application
mainClassName = "com.example.App"
val test by tasks.getting(Test::class)
useJUnitPlatform()
testLogging.showStandardStreams = true
testLogging.events = setOf(TestLogEvent.PASSED, TestLogEvent.FAILED, TestLogEvent.SKIPPED, TestLogEvent.STANDARD_OUT, TestLogEvent.STANDARD_ERROR)
tasks.withType<ShadowJar>
manifest
attributes["Implementation-Title"] = "Shadow Jar"
attributes["Implementation-Version"] = version
attributes["Main-Class"] = "com.example.App"
classifier = "jar-with-dependencies"
VERSIONS:
Gradle:
$ ./gradlew --version
------------------------------------------------------------
Gradle 5.2.1
------------------------------------------------------------
Build time: 2019-02-08 19:00:10 UTC
Revision: f02764e074c32ee8851a4e1877dd1fea8ffb7183
Kotlin DSL: 1.1.3
Kotlin: 1.3.20
Groovy: 2.5.4
Ant: Apache Ant(TM) version 1.9.13 compiled on July 10 2018
JVM: 1.8.0_201 (Oracle Corporation 25.201-b09)
OS: Linux 4.15.0-46-generic amd64
IDEA:
IntelliJ IDEA 2019.1 (Community Edition)
Build #IC-191.6183.87, built on March 27, 2019
JRE: 1.8.0_202-release-1483-b39 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Linux 4.15.0-46-generic
IDEA is configured to use gradle 'wrapper' task configuration.
OS
$ uname -a
Linux qa-pc 4.15.0-46-generic #49-Ubuntu SMP Wed Feb 6 09:33:07 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.2 LTS"
gradle intellij-idea kotlin
add a comment
|
I am using Kotlin DSL for gradle config.
./gradlew works fine, but IDEA still reports errors for ShadowJar in build.gradle.kts
Type argument is not within its bounds.
Expected:Task!
Found: ShadowJar
QUESTION:
Is there any alternative syntax for ShadowJar task that is OK for both gradle and IDEA?
git repo to reproduce the issue:
https://github.com/ludenus/gradle-kts-shadow-jar
build.gradle.kts:
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import org.gradle.api.tasks.testing.logging.TestLogEvent
plugins
kotlin("jvm") version "1.3.20"
id("com.github.johnrengelman.shadow") version "4.0.4"
application
group = "com.example"
version = "0.0.1"
repositories
jcenter()
mavenCentral()
val junitVersion = "5.4.0"
dependencies
implementation(kotlin("stdlib", "1.3.20"))
implementation("org.jetbrains.kotlin:kotlin-reflect:1.3.20")
compileClasspath("com.github.jengelman.gradle.plugins:shadow:4.0.4")
implementation("org.slf4j:slf4j-api:1.7.21")
implementation("ch.qos.logback:logback-core:1.2.3")
implementation("ch.qos.logback:logback-classic:1.2.3")
testImplementation("io.kotlintest:kotlintest-runner-junit5:3.3.1")
testImplementation("org.junit.jupiter:junit-jupiter-api:$junitVersion")
testImplementation("org.junit.jupiter:junit-jupiter-params:$junitVersion")
runtime("org.junit.jupiter:junit-jupiter-engine:$junitVersion")
application
mainClassName = "com.example.App"
val test by tasks.getting(Test::class)
useJUnitPlatform()
testLogging.showStandardStreams = true
testLogging.events = setOf(TestLogEvent.PASSED, TestLogEvent.FAILED, TestLogEvent.SKIPPED, TestLogEvent.STANDARD_OUT, TestLogEvent.STANDARD_ERROR)
tasks.withType<ShadowJar>
manifest
attributes["Implementation-Title"] = "Shadow Jar"
attributes["Implementation-Version"] = version
attributes["Main-Class"] = "com.example.App"
classifier = "jar-with-dependencies"
VERSIONS:
Gradle:
$ ./gradlew --version
------------------------------------------------------------
Gradle 5.2.1
------------------------------------------------------------
Build time: 2019-02-08 19:00:10 UTC
Revision: f02764e074c32ee8851a4e1877dd1fea8ffb7183
Kotlin DSL: 1.1.3
Kotlin: 1.3.20
Groovy: 2.5.4
Ant: Apache Ant(TM) version 1.9.13 compiled on July 10 2018
JVM: 1.8.0_201 (Oracle Corporation 25.201-b09)
OS: Linux 4.15.0-46-generic amd64
IDEA:
IntelliJ IDEA 2019.1 (Community Edition)
Build #IC-191.6183.87, built on March 27, 2019
JRE: 1.8.0_202-release-1483-b39 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Linux 4.15.0-46-generic
IDEA is configured to use gradle 'wrapper' task configuration.
OS
$ uname -a
Linux qa-pc 4.15.0-46-generic #49-Ubuntu SMP Wed Feb 6 09:33:07 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.2 LTS"
gradle intellij-idea kotlin
I am using Kotlin DSL for gradle config.
./gradlew works fine, but IDEA still reports errors for ShadowJar in build.gradle.kts
Type argument is not within its bounds.
Expected:Task!
Found: ShadowJar
QUESTION:
Is there any alternative syntax for ShadowJar task that is OK for both gradle and IDEA?
git repo to reproduce the issue:
https://github.com/ludenus/gradle-kts-shadow-jar
build.gradle.kts:
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import org.gradle.api.tasks.testing.logging.TestLogEvent
plugins
kotlin("jvm") version "1.3.20"
id("com.github.johnrengelman.shadow") version "4.0.4"
application
group = "com.example"
version = "0.0.1"
repositories
jcenter()
mavenCentral()
val junitVersion = "5.4.0"
dependencies
implementation(kotlin("stdlib", "1.3.20"))
implementation("org.jetbrains.kotlin:kotlin-reflect:1.3.20")
compileClasspath("com.github.jengelman.gradle.plugins:shadow:4.0.4")
implementation("org.slf4j:slf4j-api:1.7.21")
implementation("ch.qos.logback:logback-core:1.2.3")
implementation("ch.qos.logback:logback-classic:1.2.3")
testImplementation("io.kotlintest:kotlintest-runner-junit5:3.3.1")
testImplementation("org.junit.jupiter:junit-jupiter-api:$junitVersion")
testImplementation("org.junit.jupiter:junit-jupiter-params:$junitVersion")
runtime("org.junit.jupiter:junit-jupiter-engine:$junitVersion")
application
mainClassName = "com.example.App"
val test by tasks.getting(Test::class)
useJUnitPlatform()
testLogging.showStandardStreams = true
testLogging.events = setOf(TestLogEvent.PASSED, TestLogEvent.FAILED, TestLogEvent.SKIPPED, TestLogEvent.STANDARD_OUT, TestLogEvent.STANDARD_ERROR)
tasks.withType<ShadowJar>
manifest
attributes["Implementation-Title"] = "Shadow Jar"
attributes["Implementation-Version"] = version
attributes["Main-Class"] = "com.example.App"
classifier = "jar-with-dependencies"
VERSIONS:
Gradle:
$ ./gradlew --version
------------------------------------------------------------
Gradle 5.2.1
------------------------------------------------------------
Build time: 2019-02-08 19:00:10 UTC
Revision: f02764e074c32ee8851a4e1877dd1fea8ffb7183
Kotlin DSL: 1.1.3
Kotlin: 1.3.20
Groovy: 2.5.4
Ant: Apache Ant(TM) version 1.9.13 compiled on July 10 2018
JVM: 1.8.0_201 (Oracle Corporation 25.201-b09)
OS: Linux 4.15.0-46-generic amd64
IDEA:
IntelliJ IDEA 2019.1 (Community Edition)
Build #IC-191.6183.87, built on March 27, 2019
JRE: 1.8.0_202-release-1483-b39 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Linux 4.15.0-46-generic
IDEA is configured to use gradle 'wrapper' task configuration.
OS
$ uname -a
Linux qa-pc 4.15.0-46-generic #49-Ubuntu SMP Wed Feb 6 09:33:07 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.2 LTS"
gradle intellij-idea kotlin
gradle intellij-idea kotlin
asked Mar 28 at 14:03
ludenusludenus
6058 silver badges18 bronze badges
6058 silver badges18 bronze badges
add a comment
|
add a comment
|
1 Answer
1
active
oldest
votes
compileClasspath
is most likely confusing idea-gradle integration
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/4.0/"u003ecc by-sa 4.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%2f55399539%2fidea-reports-errors-for-shadowjar-task-in-build-gradle-kts-while-gradlew-run%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
compileClasspath
is most likely confusing idea-gradle integration
add a comment
|
compileClasspath
is most likely confusing idea-gradle integration
add a comment
|
compileClasspath
is most likely confusing idea-gradle integration
compileClasspath
is most likely confusing idea-gradle integration
answered Mar 28 at 14:53
NikkyNikky
3231 silver badge8 bronze badges
3231 silver badge8 bronze badges
add a comment
|
add a comment
|
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.
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%2f55399539%2fidea-reports-errors-for-shadowjar-task-in-build-gradle-kts-while-gradlew-run%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