From d48d888537097f22da8660b007a4c3ba189c3536 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Grze=C5=9Blowski?= Date: Tue, 29 Oct 2024 17:36:10 +0100 Subject: [PATCH] Add a group for jSupla tasks --- build.gradle | 1 + protocol/consts.gradle | 5 +++++ protocol/decoders.gradle | 2 ++ protocol/download.gradle | 3 +++ protocol/encoders.gradle | 2 ++ protocol/parser.gradle | 1 + protocol/pojoGenerator.gradle | 1 + release.gradle | 4 ++++ 8 files changed, 19 insertions(+) diff --git a/build.gradle b/build.gradle index 1b5c864e..65bc1c8e 100644 --- a/build.gradle +++ b/build.gradle @@ -80,6 +80,7 @@ allProjects { integrationTestRuntimeOnly.extendsFrom testRuntimeOnly } task integrationTest(type: Test) { + group = 'verification' description = 'Runs integration tests.' group = 'verification' diff --git a/protocol/consts.gradle b/protocol/consts.gradle index ef2b2706..011dcc14 100644 --- a/protocol/consts.gradle +++ b/protocol/consts.gradle @@ -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 { @@ -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 { @@ -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 { @@ -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 { @@ -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 { diff --git a/protocol/decoders.gradle b/protocol/decoders.gradle index 2cf12c70..4abe8d39 100644 --- a/protocol/decoders.gradle +++ b/protocol/decoders.gradle @@ -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 { @@ -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 { diff --git a/protocol/download.gradle b/protocol/download.gradle index cdce85d2..ea11c9b7 100644 --- a/protocol/download.gradle +++ b/protocol/download.gradle @@ -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) @@ -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 diff --git a/protocol/encoders.gradle b/protocol/encoders.gradle index dbff11de..ef3c360f 100644 --- a/protocol/encoders.gradle +++ b/protocol/encoders.gradle @@ -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 { @@ -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 { diff --git a/protocol/parser.gradle b/protocol/parser.gradle index c7781eba..8e24c473 100644 --- a/protocol/parser.gradle +++ b/protocol/parser.gradle @@ -670,6 +670,7 @@ class ConstsParser implements Parser> { def staticArraySize = ext.staticArraySize task parseProtoh { + group = 'jSupla' inputs.dir project.file("build" + project.downloadRootDir) outputs.dir project.file("build/parser") doLast { diff --git a/protocol/pojoGenerator.gradle b/protocol/pojoGenerator.gradle index aab52020..96e0e4a8 100644 --- a/protocol/pojoGenerator.gradle +++ b/protocol/pojoGenerator.gradle @@ -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 { diff --git a/release.gradle b/release.gradle index 9f4e3b9b..3e0507d9 100644 --- a/release.gradle +++ b/release.gradle @@ -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=(.+)/ @@ -22,6 +23,7 @@ task tag { } task noSnapshots { + group = 'jSupla' doLast { def gradleProps = project.file('gradle.properties') @@ -43,6 +45,7 @@ prodProjects { tag.dependsOn "noSnapshots" task releaseVersion { + group = 'jSupla' doLast { def gradleProps = project.file('gradle.properties') def originalContent = gradleProps.text @@ -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+)/