사용자 도구

사이트 도구


gradle:idea

차이

문서의 선택한 두 판 사이의 차이를 보여줍니다.

차이 보기로 링크

양쪽 이전 판 이전 판
다음 판
이전 판
gradle:idea [2014/02/04 17:29]
kwon37xi
gradle:idea [2020/07/07 10:40] (현재)
kwon37xi
줄 1: 줄 1:
 ====== Gradle IntelliJ IDEA ====== ====== Gradle IntelliJ IDEA ======
   * [[gradle:propdeps|propdeps plugin]]를 사용하지 않는 이상 ''idea'' 플러그인을 사용할 필요는 거의 없다. IntelliJ 자체의 Gradle 플러그인을 사용한다.   * [[gradle:propdeps|propdeps plugin]]를 사용하지 않는 이상 ''idea'' 플러그인을 사용할 필요는 거의 없다. IntelliJ 자체의 Gradle 플러그인을 사용한다.
 +  * [[https://github.com/JetBrains/gradle-idea-ext-plugin|gradle-idea-ext-plugin]] IntelliJ IDEA 부가 설정을 해줄 수 있는 플러그인.
   * [[http://www.gradle.org/docs/current/userguide/idea_plugin.html|Gradle idea plugin]]   * [[http://www.gradle.org/docs/current/userguide/idea_plugin.html|Gradle idea plugin]]
   * [[http://www.gradle.org/docs/current/dsl/org.gradle.plugins.ide.idea.model.IdeaProject.html|IdeaProject]]   * [[http://www.gradle.org/docs/current/dsl/org.gradle.plugins.ide.idea.model.IdeaProject.html|IdeaProject]]
 +  * [[https://github.com/rholder/gradle-view|Gradle View]] IntelliJ IDEA Gradle dependency view
 +  * [[https://github.com/gradle-archive/gradle-intellij-gui/wiki|Gradle GUI]] Gradle 외부 명령으로 실행 Plugin
 +===== Example =====
 +<code groovy>apply plugin: 'idea'
 +
 +idea {
 +  project {
 +    //if you want to set specific jdk and language level
 +    jdkName = '1.6'
 +    languageLevel = '1.5'
 +
 +    //you can update the source wildcards
 +    wildcards += '!?*.ruby'
 +
 +    //you can change the modules of the the *.ipr
 +    //modules = project(':someProject').idea.module
 +
 +    //you can change the output file
 +    outputFile = new File(outputFile.parentFile, 'someBetterName.ipr')
 +
 +    //you can add project-level libraries
 +    projectLibraries << new ProjectLibrary(name: "my-library", classes: [new Path("path/to/library")])
 +    
 +    ipr {
 +        withXml {
 +            def node = it.asNode()
 +            
 +            // Annotation Processor 활성화
 +            def compilerConfiguration = node.find { it.@name == 'CompilerConfiguration'}
 +
 +            def oldApplicationProcession = compilerConfiguration.annotationProcessing
 +            if (oldApplicationProcession != null) { compilerConfiguration.remove(oldApplicationProcession) }
 +
 +            def annotationProcessing = compilerConfiguration.appendNode('annotationProcessing')
 +            def profile = annotationProcessing.appendNode('profile', ['default': 'true', 'name': 'Default', 'enabled': 'true']);
 +            profile.appendNode('processorPath', ['useClasspath': 'true'])
 +            
 +            // 자동 Git 디렉토리 매핑 추가
 +            def vcsDirectoryMappingsNode = node.find { it.@name == 'VcsDirectoryMappings'}
 +            if (vcsDirectoryMappingsNode != null) {
 +                vcsDirectoryMappingsNode.appendNode('mapping', ['directory': '$PROJECT_DIR$', 'vcs': 'Git'])
 +            }
 +           
 +        }
 +    }
 +  }
 +}
 +</code>
 +
 +==== provided ====
 +<code groovy>
 +configurations {
 +  provided
 +}
 +
 +sourceSets {
 +  main {
 +    compileClasspath = compileClasspath + configurations.provided;
 +  }
 +}
 +
 +// 위의 provided 컨피규레이션은 spring prop-deps것을 사용해도 될 듯.
 +idea {
 +  module {
 +    scopes.PROVIDED.plus += configurations.provided;
 +  }
 +}
 +</code>
 +
 +==== Download dependencies' javadocs ====
 +<code>
 +idea {
 +    module {
 +        downloadJavadoc = true
 +
 +    }
 +
 +}
 +</code>
 +
gradle/idea.1391502563.txt.gz · 마지막으로 수정됨: 2014/02/04 17:29 저자 kwon37xi