@@ -7,16 +7,21 @@ import static java.nio.file.StandardCopyOption.REPLACE_EXISTING;
77// https://stackoverflow.com/a/43602463
88configurations {
99 compile. extendsFrom compileAndCopy
10+ compile. extendsFrom compileAndExtract
1011}
1112
1213dependencies {
1314 compile group : " org.processing" , name : " core" , version : " ${ processingVersion} "
1415 compile group : " org.processing" , name : " pde" , version : " ${ processingVersion} "
1516 compile group : " org.processing" , name : " java-mode" , version : " ${ processingVersion} "
1617
18+ compileAndExtract " org.eclipse.jdt:org.eclipse.jdt.debug:${ jdtVersion} "
19+
1720 compileAndCopy " org.gradle:gradle-tooling-api:${ toolingVersion} "
1821 compileAndCopy " org.slf4j:slf4j-api:${ slf4jVersion} "
19- compileAndCopy " org.slf4j:slf4j-simple:${ slf4jVersion} "
22+ compileAndCopy " org.slf4j:slf4j-simple:${ slf4jVersion} "
23+
24+ compile fileTree(include : [" jdi.jar" , " jdimodel.jar" ], dir : ' mode' )
2025}
2126
2227// This task copies the gradle tooling jar into the mode folder
@@ -34,6 +39,16 @@ sourceSets {
3439 }
3540}
3641
42+ task getjdi (type : Copy ) {
43+ // This task extracts the jar files inside org.eclipse.jdt.debug, which are
44+ // jdi.jar and jdimodel.jar and needed to build the debugger.
45+ from(zipTree(configurations. compileAndExtract. files[0 ])) {
46+ include ' **/*.jar'
47+ exclude ' META-INF'
48+ }
49+ into " mode"
50+ }
51+
3752task permissions (type :Exec ) {
3853 // This task retrieves the latest list of Android permissions and adds them
3954 // to the Permissions.java file. The python scripts requries BeautifulSoup
@@ -57,6 +72,8 @@ wrapper.doLast {
5772clean. doFirst {
5873 delete fileTree(" mode" ) {
5974 include " **/*.jar"
75+ exclude " jdi.jar"
76+ exclude " jdimodel.jar"
6077 }
6178}
6279
0 commit comments