Last active
April 17, 2016 03:17
-
-
Save yusuiked/f84671b1e5a5a5644727 to your computer and use it in GitHub Desktop.
Gradle 2.0 以降と IDEA プラグインで Configuration として provided を定義して idea.module のスコープに追加すると ClassCastException が発生する ref: http://qiita.com/yukung/items/1ccb29cc2c0cc9905e8e
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apply plugin: 'java' | |
apply plugin: 'idea' | |
sourceCompatibility = 1.8 | |
version = '0.0.1-SNAPSHOT' | |
repositories { | |
mavenCentral() | |
} | |
configurations { | |
provided | |
} | |
sourceSets { | |
main.compileClasspath += configurations.provided | |
test.compileClasspath += configurations.provided | |
test.runtimeClasspath += configurations.provided | |
} | |
dependencies { | |
provided 'org.projectlombok:lombok:1.16.2' | |
testCompile 'junit:junit:4.11' | |
} | |
idea { | |
module { | |
scopes.PROVIDED.plus += configurations.provided | |
} | |
} | |
task wrapper(type: Wrapper) { | |
gradleVersion = '2.2.1' | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
idea { | |
module { | |
scopes.PROVIDED.plus += [configurations.provided] | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment