Skip to content

Commit 9ea45ce

Browse files
authored
Merge pull request #491 from manav-mj/debugger
Debugger for Android Mode
2 parents b64acb2 + 3615bf1 commit 9ea45ce

File tree

12 files changed

+730
-61
lines changed

12 files changed

+730
-61
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
mode/processing-core.zip
2-
mode/mode/*.jar
2+
mode/mode/AndroidMode.jar
3+
mode/mode/gradle-tooling-api*
4+
mode/mode/slf4j*
35

46
mode/libraries/vr/library
57
mode/tools/SDKUpdated/tool

build.gradle

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ allprojects {
3232
ext.slf4jVersion = '1.7.10'
3333
ext.gradlewVersion = '4.4.1'
3434
ext.toolsLibVersion = '26.0.0-dev'
35+
ext.jdtVersion = '3.11.100'
3536

3637
Properties modeProperties = new Properties()
3738
modeProperties.load(project.rootProject.file("mode/mode.properties").newDataInputStream())
@@ -93,9 +94,11 @@ task dist {
9394
// Copy assets to build dir
9495
FileUtils.copyDirectory(file("mode/templates"), file("${root}/templates"))
9596
FileUtils.copyDirectory(file("mode/examples"), file("${root}/examples"))
96-
FileUtils.copyDirectory(file("mode/icons"), file("${root}/icons"))
97-
FileUtils.copyDirectory(file("mode/mode"), file("${root}/mode"))
97+
FileUtils.copyDirectory(file("mode/icons"), file("${root}/icons"))
9898
FileUtils.copyDirectory(file("mode/theme"), file("${root}/theme"))
99+
FileUtils.copyDirectory(file("mode/mode"), file("${root}/mode"))
100+
delete "${root}/mode/jdi.jar"
101+
delete "${root}/mode/jdimodel.jar"
99102

100103
Files.copy(file("mode/processing-core.zip").toPath(),
101104
file("${root}/processing-core.zip").toPath(), REPLACE_EXISTING);

mode/build.gradle

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,21 @@ import static java.nio.file.StandardCopyOption.REPLACE_EXISTING;
77
// https://stackoverflow.com/a/43602463
88
configurations {
99
compile.extendsFrom compileAndCopy
10+
compile.extendsFrom compileAndExtract
1011
}
1112

1213
dependencies {
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+
3752
task 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 {
5772
clean.doFirst {
5873
delete fileTree("mode") {
5974
include "**/*.jar"
75+
exclude "jdi.jar"
76+
exclude "jdimodel.jar"
6077
}
6178
}
6279

mode/mode/jdi.jar

73 KB
Binary file not shown.

mode/mode/jdimodel.jar

924 KB
Binary file not shown.

0 commit comments

Comments
 (0)