Skip to content

Instantly share code, notes, and snippets.

@yusuiked
Created March 2, 2015 03:00
Show Gist options
  • Save yusuiked/06331eb0dad35788c995 to your computer and use it in GitHub Desktop.
Save yusuiked/06331eb0dad35788c995 to your computer and use it in GitHub Desktop.
Gradle で provided スコープを実現する
apply plugin: 'java'
apply plugin: 'idea'
sourceCompatibility = 1.7
tasks.withType(AbstractCompile) { options.encoding = 'UTF-8' }
version = '1.0'
configurations {
provided
}
sourceSets {
main.compileClasspath += configurations.provided
test.compileClasspath += configurations.provided
test.runtimeClasspath += configurations.provided
}
repositories {
mavenCentral()
}
dependencies {
provided 'org.projectlombok:lombok:1.14.8'
testCompile group: 'junit', name: 'junit', version: '4.11'
}
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