aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2014-04-09 14:14:02 +0000
committerFlorian Dold <florian.dold@gmail.com>2014-04-09 14:14:02 +0000
commitd52a79a404e50f13698171f2b046523f78136041 (patch)
treed1a003512b477d7e3ea7272a3f3dbb3bcb6fa761
parent73a6a7138cda7b031f06b92d35419e76f54158db (diff)
downloadgnunet-java-ext-d52a79a404e50f13698171f2b046523f78136041.tar.gz
gnunet-java-ext-d52a79a404e50f13698171f2b046523f78136041.zip
fix message type generation
-rw-r--r--build.gradle12
-rw-r--r--src/main/java/org/gnunet/construct/MsgMap.txt4
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
24compileJava.options.debugOptions.debugLevel = "source,lines,vars" 24compileJava.options.debugOptions.debugLevel = "source,lines,vars"
25 25
26task msgtypes (type: JavaCompile) { 26
27task createResourcesDir << {
28 def myDir = new File('src/main/resources')
29 myDir.mkdirs()
30}
31
32task 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
36task copyDeps(type: Copy) { 44task 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 @@
1org.gnunet.util.GnunetMessage$Body|42001=org.gnunet.ext.GreetingRequestMessage
1org.gnunet.util.GnunetMessage$Body|42003=org.gnunet.ext.GreetingBannedMessage 2org.gnunet.util.GnunetMessage$Body|42003=org.gnunet.ext.GreetingBannedMessage
2org.gnunet.util.GnunetMessage$Body|42002=org.gnunet.ext.GreetingResponseMessage 3org.gnunet.util.GnunetMessage$Body|42002=org.gnunet.ext.GreetingResponseMessage
3org.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