Skip to content

Commit

Permalink
Add a group for jSupla tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
magx2 committed Oct 29, 2024
1 parent 7723639 commit d48d888
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 0 deletions.
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ allProjects {
integrationTestRuntimeOnly.extendsFrom testRuntimeOnly
}
task integrationTest(type: Test) {
group = 'verification'
description = 'Runs integration tests.'
group = 'verification'

Expand Down
5 changes: 5 additions & 0 deletions protocol/consts.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ List overrides = [
]

task constsGenerator {
group = 'jSupla'
inputs.file new File(project.file("build/parser"), "consts.json")
outputs.file project.file("build/generated/sources/jsupla/main/java/pl/grzeslowski/jsupla/protocol/api/consts/ProtoConsts.java")
doLast {
Expand Down Expand Up @@ -61,6 +62,7 @@ constsGenerator.dependsOn "parseProtoh"
compileJava.dependsOn "constsGenerator"

task callTypesGenerator {
group = 'jSupla'
inputs.file new File(project.file("build/parser"), "consts.json")
outputs.dir project.file("build/generated/sources/jsupla/main/java/pl/grzeslowski/jsupla/protocol/api/calltypes/")
doLast {
Expand Down Expand Up @@ -95,6 +97,7 @@ callTypesGenerator.dependsOn "parseProtoh"
compileJava.dependsOn "callTypesGenerator"

task resultCodeGenerator {
group = 'jSupla'
inputs.file new File(project.file("build/parser"), "consts.json")
outputs.file project.file("build/generated/sources/jsupla/main/java/pl/grzeslowski/jsupla/protocol/api/ResultCode.java")
doLast {
Expand Down Expand Up @@ -139,6 +142,7 @@ resultCodeGenerator.dependsOn "parseProtoh"
compileJava.dependsOn "resultCodeGenerator"

task channelTypeGenerator {
group = 'jSupla'
inputs.file new File(project.file("build/parser"), "consts.json")
outputs.file project.file("build/generated/sources/jsupla/main/java/pl/grzeslowski/jsupla/protocol/api/ChannelType.java")
doLast {
Expand Down Expand Up @@ -212,6 +216,7 @@ static boolean isCallType(String name) {
}

task channelFunctionGenerator {
group = 'jSupla'
inputs.file new File(project.file("build/parser"), "consts.json")
outputs.file project.file("build/generated/sources/jsupla/main/java/pl/grzeslowski/jsupla/protocol/api/ChannelFunction.java")
doLast {
Expand Down
2 changes: 2 additions & 0 deletions protocol/decoders.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import java.time.ZonedDateTime
import static java.util.stream.Collectors.joining

task decodersGenerator {
group = 'jSupla'
inputs.file new File(project.file("build/parser"), "proto.h.json")
outputs.dir project.file("build/generated/sources/jsupla/main/java/pl/grzeslowski/jsupla/protocol/")
doLast {
Expand All @@ -31,6 +32,7 @@ decodersGenerator.dependsOn "parseProtoh"
compileJava.dependsOn "decodersGenerator"

task decoderFactoryGenerator {
group = 'jSupla'
inputs.file new File(project.file("build/parser"), "proto.h.json")
outputs.file project.file("build/generated/sources/jsupla/main/java/pl/grzeslowski/jsupla/protocol/api/decoders/DecoderFactoryImpl.java")
doLast {
Expand Down
3 changes: 3 additions & 0 deletions protocol/download.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,14 @@ import static org.assertj.core.api.Assertions.*
import static org.assertj.core.api.Assertions.assertThat

task downloadProtoLatest {
group = 'jSupla'
outputs.dir project.file("build" + project.downloadRootDir)
doLast {
downloadProtoByTag(project.downloadLatestTag as String)
}
}
task downloadProtoStable {
group = 'jSupla'
outputs.dir project.file("build" + project.downloadRootDir)
doLast {
downloadProtoByTag(project.downloadStableTag as String)
Expand All @@ -28,6 +30,7 @@ task downloadProtoStable {
parseProtoh.dependsOn "downloadProtoStable"

task checkForProtoUpdate {
group = 'jSupla'
doLast {
def rootDir = project.file("build" + project.downloadRootDir).toPath()
def downloadStableTag = project.downloadStableTag
Expand Down
2 changes: 2 additions & 0 deletions protocol/encoders.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import java.time.ZonedDateTime
import static java.util.stream.Collectors.joining

task encodersGenerator {
group = 'jSupla'
inputs.file new File(project.file("build/parser"), "proto.h.json")
outputs.dir project.file("build/generated/sources/jsupla/main/java/pl/grzeslowski/jsupla/protocol/")
doLast {
Expand All @@ -31,6 +32,7 @@ encodersGenerator.dependsOn "parseProtoh"
compileJava.dependsOn "encodersGenerator"

task encoderFactoryGenerator {
group = 'jSupla'
inputs.file new File(project.file("build/parser"), "proto.h.json")
outputs.file project.file("build/generated/sources/jsupla/main/java/pl/grzeslowski/jsupla/protocol/api/encoders/EncoderFactoryImpl.java")
doLast {
Expand Down
1 change: 1 addition & 0 deletions protocol/parser.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -670,6 +670,7 @@ class ConstsParser implements Parser<List<Const>> {
def staticArraySize = ext.staticArraySize

task parseProtoh {
group = 'jSupla'
inputs.dir project.file("build" + project.downloadRootDir)
outputs.dir project.file("build/parser")
doLast {
Expand Down
1 change: 1 addition & 0 deletions protocol/pojoGenerator.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ void generatePojo(struct, Path generatedSourceRoot) {
}

task pojoGenerator {
group = 'jSupla'
inputs.file new File(project.file("build/parser"), "proto.h.json")
outputs.dir project.file("build/generated/sources/jsupla/main/java/pl/grzeslowski/jsupla/protocol")
doLast {
Expand Down
4 changes: 4 additions & 0 deletions release.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import java.nio.file.Files

task tag {
group = 'jSupla'
doLast {
def gradleProps = project.file('gradle.properties')
def match = gradleProps.text =~ /jSuplaVersion=(.+)/
Expand All @@ -22,6 +23,7 @@ task tag {
}

task noSnapshots {
group = 'jSupla'
doLast {
def gradleProps = project.file('gradle.properties')

Expand All @@ -43,6 +45,7 @@ prodProjects {
tag.dependsOn "noSnapshots"

task releaseVersion {
group = 'jSupla'
doLast {
def gradleProps = project.file('gradle.properties')
def originalContent = gradleProps.text
Expand All @@ -60,6 +63,7 @@ task releaseVersion {
}

task nextSnapshot {
group = 'jSupla'
doLast {
def gradleProps = project.file('gradle.properties')
def match = gradleProps.text =~ /jSuplaVersion=(\d+)\.(\d+)\.(\d+)/
Expand Down

0 comments on commit d48d888

Please sign in to comment.