Skip to content

Commit

Permalink
add readme's
Browse files Browse the repository at this point in the history
  • Loading branch information
larsgrefer committed May 27, 2018
1 parent b03d76e commit 7d7daa6
Show file tree
Hide file tree
Showing 3 changed files with 101 additions and 0 deletions.
17 changes: 17 additions & 0 deletions jsass-plugin/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# jSass Gradle Plugin

Available from plugins.gradle.org: https://plugins.gradle.org/search?term=io.freefair.jsass

## Plugins

### `io.freefair.jsass-base`

Adds the `jSass` extension and some Conventions to the project.

### `io.freefair.jsass-java`

Compiles SASS/SCSS in java source set resources (e.g. `src/*/resources`)

### `io.freefair.jsass-war`

Compiles SASS/SCSS in web resources (`src/main/webapp`)
59 changes: 59 additions & 0 deletions war-plugin/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Enhanced `war` tasks

## Plugins

### `io.freefair.war-overlay`

Adds maven-like overlays to every task of type `War`:

```groovy
war {
overlays {
foo {
from "com.example:foo:1.0@war"
// enabled = true
// provided = false
// enableCompilation = true
// exclude "*.html"
}
bar {
from project(":bar")
}
}
}
```

Every `War` task is extended with a `overlays` property which is a `NamedDomainObjectContainer` of
`WarOverlay` objects. This can be compared to the `<overlays>` configuration parameter of the `maven-war-plugin`:
https://maven.apache.org/plugins/maven-war-plugin/war-mojo.html#overlays

The source of the war overlays can be

* an [`AbstractArchiveTask`](https://docs.gradle.org/current/javadoc/org/gradle/api/tasks/bundling/AbstractArchiveTask.html)
* another project (`project(":foo")`) which has the `war` plugin applied
* a dependency in any of the notations described [here](https://docs.gradle.org/current/javadoc/org/gradle/api/artifacts/dsl/DependencyHandler.html)
(The dependency has to resolve to a single war, jar or zip file)

### `io.freefair.war-attach-classes`

This plugin ports the [`attachClasses`](https://maven.apache.org/plugins/maven-war-plugin/war-mojo.html#attachClasses)
configuration parameter of the `maven-war-plugin` to gradle:

```groovy
war {
attachClasses = true
// classesClassifier = "classes"
}
```

### `io.freefair.war-archive-classes`

This plugin ports the [`archiveClasses`](https://maven.apache.org/plugins/maven-war-plugin/war-mojo.html#archiveClasses)
configuration parameter of the `maven-war-plugin` to gradle:

```groovy
war {
archiveClasses = true
}
```
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import groovy.lang.Closure;
import lombok.Getter;
import lombok.Setter;
import org.gradle.api.file.CopySpec;
import org.gradle.api.file.DuplicatesStrategy;
import org.gradle.api.file.FileTreeElement;
import org.gradle.api.internal.file.copy.CopySpecInternal;
Expand Down Expand Up @@ -126,6 +127,22 @@ public void setExcludes(Iterable<String> excludes) {
getWarCopySpec().setExcludes(excludes);
}

public CopySpec include(String... includes) {
return getWarCopySpec().include(includes);
}

public CopySpec include(Iterable<String> includes) {
return getWarCopySpec().include(includes);
}

public CopySpec include(Spec<FileTreeElement> includeSpec) {
return getWarCopySpec().include(includeSpec);
}

public CopySpec include(Closure includeSpec) {
return getWarCopySpec().include(includeSpec);
}

public void exclude(String... excludes) {
getWarCopySpec().exclude(excludes);
}
Expand All @@ -142,7 +159,15 @@ public void exclude(Closure excludeSpec) {
getWarCopySpec().exclude(excludeSpec);
}

public Set<String> getIncludes() {
return getWarCopySpec().getIncludes();
}

public Set<String> getExcludes() {
return getWarCopySpec().getExcludes();
}

public CopySpec setIncludes(Iterable<String> includes) {
return getWarCopySpec().setIncludes(includes);
}
}

0 comments on commit 7d7daa6

Please sign in to comment.