사용자 도구

사이트 도구


gradle:idea

Gradle IntelliJ IDEA

Example

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'])
            }
 
        }
    }
  }
}

provided

configurations {
  provided
}
 
sourceSets {
  main {
    compileClasspath = compileClasspath + configurations.provided;
  }
}
 
// 위의 provided 컨피규레이션은 spring prop-deps것을 사용해도 될 듯.
idea {
  module {
    scopes.PROVIDED.plus += configurations.provided;
  }
}

Download dependencies' javadocs

idea {
    module {
        downloadJavadoc = true

    }

}
gradle/idea.txt · 마지막으로 수정됨: 2020/07/07 10:40 저자 kwon37xi