Skip to content

Instantly share code, notes, and snippets.

@yusuiked
Last active April 17, 2016 03:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yusuiked/f84671b1e5a5a5644727 to your computer and use it in GitHub Desktop.
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
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'
}
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