Skip to content

Commit

Permalink
Debugging hareness
Browse files Browse the repository at this point in the history
  • Loading branch information
Duzhinsky committed Dec 7, 2023
1 parent 2d69e18 commit c748898
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .run/Run dump.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Run dump" type="Application" factoryName="Application">
<option name="MAIN_CLASS_NAME" value="org.sudu.protogen.Main" />
<module name="protogen.generator.main" />
<option name="PROGRAM_PARAMETERS" value=".\tests\build\generated\source\proto\test\protogen-debug\descriptor_dump" />
<extension name="coverage">
<pattern>
<option name="PATTERN" value="org.sudu.protogen.*" />
<option name="ENABLED" value="true" />
</pattern>
</extension>
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
</component>
9 changes: 9 additions & 0 deletions generator/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar

plugins {
id("com.google.protobuf") version "0.9.1"
`maven-publish`
Expand Down Expand Up @@ -69,6 +71,13 @@ tasks.shadowJar {
manifest.attributes["Main-Class"] = "org.sudu.protogen.Main"
}

val shadowDebugger = tasks.register<ShadowJar>("debuggerShadowJar") {
archiveClassifier = "debugGenerator"
manifest.attributes["Main-Class"] = "org.sudu.protogen.plugin.dump.DumpGenerator"
from(sourceSets.main.get().output)
configurations.add(project.configurations.runtimeClasspath.get())
}

dependencies {
implementation(project(":javapoet"))
implementation(project(":options"))
Expand Down
4 changes: 4 additions & 0 deletions tests/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ protobuf {
id("protogen") {
path = "${project(":generator").buildDir.absolutePath}/libs/generator-${version}-jvm.jar"
}
id("protogen-debug") {
path = "${project(":generator").buildDir.absolutePath}/libs/generator-${version}-debugGenerator.jar"
}
}
generateProtoTasks {
all().forEach {
Expand All @@ -27,6 +30,7 @@ protobuf {
// so windows-paths broke options list. To overcome it I suggest to replace it with "*"
option("config=$projectDir/src/test/proto/protogen/".replace(":", "*"))
}
id("protogen-debug")
}
}
}
Expand Down

0 comments on commit c748898

Please sign in to comment.