Skip to content

Simplify and improve the buildSrc gradle plugin #7302

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 29, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 10 additions & 11 deletions buildSrc/build.gradle
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
apply plugin: 'java'
apply plugin: "java-gradle-plugin"

repositories {
mavenCentral()
}

dependencies {
compile gradleApi()
}

// GAE
dependencies {
compile 'com.google.appengine:appengine-tools-sdk:1.4.2'
gradlePlugin {
plugins {
trang {
id = "trang"
implementationClass = "trang.TrangPlugin"
}
}
}

// Trang
dependencies {
compile 'com.thaiopensource:trang:20091111',
'net.sourceforge.saxon:saxon:9.1.0.8'
compile 'com.thaiopensource:trang:20091111'
compile 'net.sourceforge.saxon:saxon:9.1.0.8'
}

task ide(type: Copy) {
Expand Down
8 changes: 4 additions & 4 deletions buildSrc/src/main/java/trang/TrangPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import org.gradle.api.Plugin;
import org.gradle.api.Project;
import org.gradle.api.Task;

/**
* Used for converting .rnc files to .xsd files.
Expand All @@ -11,8 +10,9 @@
public class TrangPlugin implements Plugin<Project> {
@Override
public void apply(Project project) {
Task rncToXsd = project.getTasks().create("rncToXsd", RncToXsd.class);
rncToXsd.setDescription("Converts .rnc to .xsd");
rncToXsd.setGroup("Build");
project.getTasks().register("rncToXsd", RncToXsd.class, rncToXsd -> {
rncToXsd.setDescription("Converts .rnc to .xsd");
rncToXsd.setGroup("Build");
});
}
}

This file was deleted.