사용자 도구

사이트 도구


gradle:idea

차이

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

차이 보기로 링크

양쪽 이전 판 이전 판
다음 판
이전 판
마지막 판 양쪽 다음 판
gradle:idea [2014/02/12 23:00]
kwon37xi
gradle:idea [2015/10/04 18:38]
kwon37xi [provided]
줄 3: 줄 3:
   * [[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 ===== ===== Example =====
 <code groovy>apply plugin: 'idea' <code groovy>apply plugin: 'idea'
줄 24: 줄 25:
     //you can add project-level libraries     //you can add project-level libraries
     projectLibraries << new ProjectLibrary(name: "my-library", classes: [new Path("path/to/library")])     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> </code>
  
gradle/idea.txt · 마지막으로 수정됨: 2020/07/07 10:40 저자 kwon37xi