The docs for changing the java project layout are here.

To specify an include pattern filter, this is how to do it:

    sourceSets {
        main {
            java {
                srcDirs = [MY_OTHER_PROJECT + '/src']
                include('com/bsia/android/only/these/**/*')
            }
        }
    }

More info on the PatternFilterable and the SourceDirectorySet docs.

Just to be clear, in the above, java is a SourceDirectorySet object.