diff options
author | Florian Dold <florian.dold@gmail.com> | 2014-04-09 14:14:02 +0000 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2014-04-09 14:14:02 +0000 |
commit | d52a79a404e50f13698171f2b046523f78136041 (patch) | |
tree | d1a003512b477d7e3ea7272a3f3dbb3bcb6fa761 | |
parent | 73a6a7138cda7b031f06b92d35419e76f54158db (diff) | |
download | gnunet-java-ext-d52a79a404e50f13698171f2b046523f78136041.tar.gz gnunet-java-ext-d52a79a404e50f13698171f2b046523f78136041.zip |
fix message type generation
-rw-r--r-- | build.gradle | 12 | ||||
-rw-r--r-- | src/main/java/org/gnunet/construct/MsgMap.txt | 4 |
2 files changed, 12 insertions, 4 deletions
diff --git a/build.gradle b/build.gradle index 2412f11..19ea201 100644 --- a/build.gradle +++ b/build.gradle | |||
@@ -23,16 +23,24 @@ dependencies { | |||
23 | 23 | ||
24 | compileJava.options.debugOptions.debugLevel = "source,lines,vars" | 24 | compileJava.options.debugOptions.debugLevel = "source,lines,vars" |
25 | 25 | ||
26 | task msgtypes (type: JavaCompile) { | 26 | |
27 | task createResourcesDir << { | ||
28 | def myDir = new File('src/main/resources') | ||
29 | myDir.mkdirs() | ||
30 | } | ||
31 | |||
32 | task msgtypes (type: JavaCompile, dependsOn: 'createResourcesDir') { | ||
27 | description = "Updates the index of GNUnet message types known to gnunet-java." | 33 | description = "Updates the index of GNUnet message types known to gnunet-java." |
28 | classpath = project.sourceSets.main.runtimeClasspath | 34 | classpath = project.sourceSets.main.runtimeClasspath |
29 | source = files(project.sourceSets.main.allJava) | 35 | source = files(project.sourceSets.main.allJava) |
30 | options.setCompilerArgs(["-processor", "org.gnunet.construct.MessageIdAnnotationProcessor", | 36 | options.setCompilerArgs(["-processor", "org.gnunet.construct.MessageIdAnnotationProcessor", |
31 | "-proc:only", | 37 | "-proc:only", |
32 | "-s", "src"]) | 38 | // generated "source" files should resources, tell the annotation processor! |
39 | "-s", "src/main/resources"]) | ||
33 | destinationDir = file("$buildDir/classes/main/") | 40 | destinationDir = file("$buildDir/classes/main/") |
34 | } | 41 | } |
35 | 42 | ||
43 | |||
36 | task copyDeps(type: Copy) { | 44 | task copyDeps(type: Copy) { |
37 | into "$projectDir/lib" | 45 | into "$projectDir/lib" |
38 | from configurations.runtime | 46 | from configurations.runtime |
diff --git a/src/main/java/org/gnunet/construct/MsgMap.txt b/src/main/java/org/gnunet/construct/MsgMap.txt index 0a8e7dc..8c97ee1 100644 --- a/src/main/java/org/gnunet/construct/MsgMap.txt +++ b/src/main/java/org/gnunet/construct/MsgMap.txt | |||
@@ -1,4 +1,4 @@ | |||
1 | org.gnunet.util.GnunetMessage$Body|42001=org.gnunet.ext.GreetingRequestMessage | ||
1 | org.gnunet.util.GnunetMessage$Body|42003=org.gnunet.ext.GreetingBannedMessage | 2 | org.gnunet.util.GnunetMessage$Body|42003=org.gnunet.ext.GreetingBannedMessage |
2 | org.gnunet.util.GnunetMessage$Body|42002=org.gnunet.ext.GreetingResponseMessage | 3 | org.gnunet.util.GnunetMessage$Body|42002=org.gnunet.ext.GreetingResponseMessage |
3 | org.gnunet.util.GnunetMessage$Body|42001=org.gnunet.ext.GreetingRequestMessage | 4 | # generated 2014/04/09 16:10:16 |
4 | # generated 2012/08/29 02:16:37 | ||