[SOLVED] Gradle exclude folders in project

How do I exclude folders from being shown in the SDK project view?

Reference the library instead of copying it into your project.

Or make a new project and reference that.

A bin folder is short for binary - aka compiled files, not source files, so they probably don’t want to be in a folder containing sources.

This is in my gradle:

project(':interface'){
    apply plugin:'java'
    
    buildDir = rootProject.file("build/interface")
    
    sourceSets {
        main {
            java {
                srcDir '.'
            }
        }
    }
    
    dependencies {
        compile "com.simsilica:sim-math:$simMathVersion"
        compile "com.simsilica:sio2:$simSiO2Version"
        compile "com.simsilica:zay-es:$simZayESVersion"
        compile 'org.dyn4j:dyn4j:3.3.0'
        compile 'com.github.implicit-invocation:jwalkable:master-SNAPSHOT'
        compile 'org.ini4j:ini4j:0.5.4'
    }
}

I’m not sure why the SDK is showing me the bin-folder

Well, do a “ls”/dir of your project folder/it’s source dir (which is . and not src/ and thus probably includes all of that?).
Apart from that Gradle usually uses build/ as output, not bin anyway.

Have a look at the generated jar, I bet it contains all these bin packages as well, so you’d need to exclude them via gradle or adjust your srcDir

Thanks :slight_smile:

1 Like