Gradle 빌드 도구로 관리되는 애플리케이션 프로젝트에서
모든 폴더를 한눈에 볼 수 있는 것이 더 편리합니다
애플리케이션 개발 참여자,
리소스 폴더처럼 ~가 아닌 것들
관례적인 경로 내에.
예를 들어 src/jbake 폴더를 원한다면,
‘resource folder’로 표시되도록,
프로젝트 설정으로 들어가서 이를 수행할 수 있습니다.
IDE의 위저드에서. 하지만 이 옵션은 다음 재로드 시 저장되지 않습니다.
IDE의 Gradle 프로젝트에서. 이 설정을 영구적으로 적용하려면
해결 방법은 소스 경로 설정을 오버라이드하는 것입니다.
build.gradle` 설정 파일의 18, 19, 20 및 21행과 같이:
build.gradle

plugins {
    id "java"
    id "groovy"
    id "org.jbake.site" version "5.0.0"
    id "org.ajoberstar.git-publish" version "2.1.1"
}
repositories {
    mavenCentral()
    jcenter()
}
group project_group
version project_version
sourceSets {
    main {
        java { srcDirs = [] }
        groovy { srcDirs =["src/main/java", "src/main/groovy"] }
        resources {
            srcDirs =[
                    "src/main/resources",
                    "src/jbake"//in order to get site src content in the IDE
            ]
        }
    }
    test {
        java { srcDirs = [] }
        groovy { srcDirs =["src/test/java", "src/test/groovy"] }
    }
}
test {
    useJUnitPlatform()
}
configurations {
    ivy
}
dependencies {
    ivy "org.apache.ivy:ivy:$ivy_version"
    implementation "org.codehaus.groovy:groovy-all:$groovy_version"
    implementation "org.asciidoctor:asciidoctor-java-integration:$asciidoctor_java_integration_version"
    implementation "org.freemarker:freemarker:$freemarker_version"
    testImplementation "org.junit.jupiter:junit-jupiter-api:$junit5_version"
    testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junit5_version"
}
gitPublish {
    repoUri = github_pages_blog_repository
    branch = git_branch
    contents {
        from(file(jbake_content_from)) {
            into jbake_content_to
        }
    }
}
tasks.withType(GroovyCompile) {
    groovyClasspath += configurations.ivy
}

관련 기사