Skip to content

Commit

Permalink
Make tasks cacheable
Browse files Browse the repository at this point in the history
  • Loading branch information
zbynek committed Dec 9, 2023
1 parent 30cbacf commit 911eeb2
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ To use the Gradle Plugins DSL, add the following lines to your `build.gradle` sc

```gradle
plugins {
id "org.javacc.javacc" version "3.0.1"
id "org.javacc.javacc" version "3.0.2"
}
```

Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ plugins {

allprojects {
group = 'org.javacc.plugin'
version = '3.0.1'
version = '3.0.2'
}

defaultTasks 'clean', ':javacc-gradle-plugin:build'
Expand Down
9 changes: 4 additions & 5 deletions subprojects/plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -157,11 +157,10 @@ publishing {
afterEvaluate {
publishing {
publications {
it.find({ it.artifactId == 'org.javacc.javacc.gradle.plugin'}).pom.withXml {
def scm = asNode().appendNode('scm')
scm.appendNode('url', 'https://github.com/javacc/javaccPlugin')
scm.appendNode('connection', 'scm:https://github.com/javacc/javaccPlugin.git')
scm.appendNode('developerConnection', 'scm:git://github.com/javacc/javaccPlugin.git')
it.find({ it.artifactId == 'org.javacc.javacc.gradle.plugin'}).pom.scm {
url = 'https://github.com/javacc/javaccPlugin'
connection = 'scm:https://github.com/javacc/javaccPlugin.git'
developerConnection = 'scm:git://github.com/javacc/javaccPlugin.git'
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import java.io.File;

import org.gradle.api.tasks.CacheableTask;
import org.gradle.api.tasks.TaskAction;
import org.gradle.api.tasks.TaskCollection;
import org.gradle.api.tasks.compile.JavaCompile;
Expand All @@ -13,6 +14,7 @@
import org.javacc.plugin.gradle.javacc.programexecution.JavaccProgramInvoker;
import org.javacc.plugin.gradle.javacc.programexecution.ProgramArguments;

@CacheableTask
public class CompileJavaccTask extends AbstractJavaccTask {
public static final String TASK_NAME_VALUE = "compileJavacc";
public static final String TASK_DESCRIPTION_VALUE = "Compiles JavaCC files into Java files";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import java.io.File;

import org.gradle.api.tasks.CacheableTask;
import org.gradle.api.tasks.TaskAction;
import org.gradle.api.tasks.TaskCollection;
import org.gradle.api.tasks.compile.JavaCompile;
Expand All @@ -13,6 +14,7 @@
import org.javacc.plugin.gradle.javacc.programexecution.JjdocProgramInvoker;
import org.javacc.plugin.gradle.javacc.programexecution.ProgramArguments;

@CacheableTask
public class CompileJjdocTask extends AbstractJavaccTask {
public static final String TASK_NAME_VALUE = "jjdoc";
public static final String TASK_DESCRIPTION_VALUE = "Takes a JavaCC parser specification and produces documentation for the BNF grammar";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import java.io.File;

import org.gradle.api.tasks.CacheableTask;
import org.gradle.api.tasks.TaskAction;
import org.gradle.api.tasks.TaskCollection;
import org.gradle.api.tasks.compile.JavaCompile;
Expand All @@ -13,6 +14,7 @@
import org.javacc.plugin.gradle.javacc.programexecution.JjtreeProgramInvoker;
import org.javacc.plugin.gradle.javacc.programexecution.ProgramArguments;

@CacheableTask
public class CompileJjtreeTask extends AbstractJavaccTask {
public static final String TASK_NAME_VALUE = "compileJjtree";
public static final String TASK_DESCRIPTION_VALUE = "Compiles JJTree files into JavaCC files";
Expand Down

0 comments on commit 911eeb2

Please sign in to comment.