|
|
@ -17,52 +17,23 @@ dependencies { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
task generateNativeHeaders(type: Exec, dependsOn: classes) { |
|
|
|
task generateNativeHeaders(type: Exec, dependsOn: classes) { |
|
|
|
def classes = " \ |
|
|
|
def files0 = fileTree("src/main/java/").filter { it.isFile() && it.getName().endsWith(".java") }.files |
|
|
|
com.jme3.bullet.PhysicsSpace, \ |
|
|
|
def files1 = fileTree("src/common/java/").filter { it.isFile() && it.getName().endsWith(".java") }.files |
|
|
|
\ |
|
|
|
def files2 = fileTree("../jme3-core/src/main/java/").filter { it.isFile() && it.getName().endsWith(".java") }.files |
|
|
|
com.jme3.bullet.collision.PhysicsCollisionEvent, \ |
|
|
|
def files3 = fileTree("../jme3-core/src/plugins/java/").filter { it.isFile() && it.getName().endsWith(".java") }.files |
|
|
|
com.jme3.bullet.collision.PhysicsCollisionObject,\ |
|
|
|
def files4 = fileTree("../jme3-core/src/tools/java/").filter { it.isFile() && it.getName().endsWith(".java") }.files |
|
|
|
com.jme3.bullet.objects.PhysicsCharacter, \ |
|
|
|
def files5 = fileTree("../jme3-terrain/src/main/java/").filter { it.isFile() && it.getName().endsWith(".java") }.files |
|
|
|
com.jme3.bullet.objects.PhysicsGhostObject, \ |
|
|
|
|
|
|
|
com.jme3.bullet.objects.PhysicsRigidBody, \ |
|
|
|
|
|
|
|
com.jme3.bullet.objects.PhysicsVehicle, \ |
|
|
|
|
|
|
|
com.jme3.bullet.objects.VehicleWheel, \ |
|
|
|
|
|
|
|
com.jme3.bullet.objects.infos.RigidBodyMotionState, \ |
|
|
|
|
|
|
|
\ |
|
|
|
|
|
|
|
com.jme3.bullet.collision.shapes.CollisionShape, \ |
|
|
|
|
|
|
|
com.jme3.bullet.collision.shapes.BoxCollisionShape, \ |
|
|
|
|
|
|
|
com.jme3.bullet.collision.shapes.CapsuleCollisionShape, \ |
|
|
|
|
|
|
|
com.jme3.bullet.collision.shapes.CompoundCollisionShape, \ |
|
|
|
|
|
|
|
com.jme3.bullet.collision.shapes.ConeCollisionShape, \ |
|
|
|
|
|
|
|
com.jme3.bullet.collision.shapes.CylinderCollisionShape, \ |
|
|
|
|
|
|
|
com.jme3.bullet.collision.shapes.GImpactCollisionShape, \ |
|
|
|
|
|
|
|
com.jme3.bullet.collision.shapes.HeightfieldCollisionShape, \ |
|
|
|
|
|
|
|
com.jme3.bullet.collision.shapes.HullCollisionShape, \ |
|
|
|
|
|
|
|
com.jme3.bullet.collision.shapes.MeshCollisionShape, \ |
|
|
|
|
|
|
|
com.jme3.bullet.collision.shapes.PlaneCollisionShape, \ |
|
|
|
|
|
|
|
com.jme3.bullet.collision.shapes.SimplexCollisionShape, \ |
|
|
|
|
|
|
|
com.jme3.bullet.collision.shapes.SphereCollisionShape, \ |
|
|
|
|
|
|
|
\ |
|
|
|
|
|
|
|
com.jme3.bullet.joints.PhysicsJoint, \ |
|
|
|
|
|
|
|
com.jme3.bullet.joints.ConeJoint, \ |
|
|
|
|
|
|
|
com.jme3.bullet.joints.HingeJoint, \ |
|
|
|
|
|
|
|
com.jme3.bullet.joints.Point2PointJoint, \ |
|
|
|
|
|
|
|
com.jme3.bullet.joints.SixDofJoint, \ |
|
|
|
|
|
|
|
com.jme3.bullet.joints.SixDofSpringJoint, \ |
|
|
|
|
|
|
|
com.jme3.bullet.joints.SliderJoint, \ |
|
|
|
|
|
|
|
com.jme3.bullet.joints.motors.RotationalLimitMotor, \ |
|
|
|
|
|
|
|
com.jme3.bullet.joints.motors.TranslationalLimitMotor, \ |
|
|
|
|
|
|
|
\ |
|
|
|
|
|
|
|
com.jme3.bullet.util.NativeMeshUtil, \ |
|
|
|
|
|
|
|
com.jme3.bullet.util.DebugShapeFactory" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def classpath = sourceSets.main.runtimeClasspath.asPath |
|
|
|
def classpath = sourceSets.main.runtimeClasspath.asPath |
|
|
|
def nativeIncludes = new File(project(":jme3-bullet-native").projectDir, "src/native/cpp") |
|
|
|
def nativeIncludes = new File(project(":jme3-bullet-native").projectDir, "src/native/cpp") |
|
|
|
|
|
|
|
def filesList = "\"" + files0.join("\"\n\"") + "\"\n\"" + files1.join("\"\n\"") + "\"\n\"" + files2.join("\"\n\"") + "\"\n\"" + files3.join("\"\n\"") + "\"\n\"" + files4.join("\"\n\"") + "\"\n\"" + files5.join("\"\n\"") + "\"" |
|
|
|
executable org.gradle.internal.jvm.Jvm.current().getExecutable('javah') |
|
|
|
new File("$projectDir/java_classes.jtxt").text = filesList.replaceAll(java.util.regex.Pattern.quote("\\"), java.util.regex.Matcher.quoteReplacement("/")) |
|
|
|
args "-d", nativeIncludes |
|
|
|
//project.logger.lifecycle("Files: " + files0.size()) |
|
|
|
args "-classpath", classpath |
|
|
|
//project.logger.lifecycle("Files: " + files1.size()) |
|
|
|
args classes.split(",").collect { it.trim() } |
|
|
|
executable org.gradle.internal.jvm.Jvm.current().getExecutable('javac') |
|
|
|
|
|
|
|
args "-h", nativeIncludes |
|
|
|
|
|
|
|
//args "-classpath", classpath |
|
|
|
|
|
|
|
args "@$projectDir/java_classes.jtxt" |
|
|
|
|
|
|
|
//args classes.split(",").collect { it.trim() } |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
assemble.dependsOn(generateNativeHeaders) |
|
|
|
assemble.dependsOn(generateNativeHeaders) |