Skip to content

Commit

Permalink
Update documentation for Gradle plugin portal
Browse files Browse the repository at this point in the history
  • Loading branch information
uschindler committed Sep 17, 2018
1 parent 59ceb98 commit 4b654b1
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 15 deletions.
23 changes: 11 additions & 12 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,14 @@
<contains string="${version}" substring="-SNAPSHOT"/>
</condition>

<filterset id="artifact-props-filterset">
<filter token="NAME" value="${ant.project.name}"/>
<filter token="VERSION" value="${version}"/>
<filter token="GROUPID" value="${groupId}"/>
<filter token="ARTIFACTID" value="${artifactId}"/>
<filter token="DESCRIPTION" value="${description}"/>
</filterset>

<property name="ivy.install.version" value="2.3.0" />
<property name="ivy.jar.dir" location=".ivy" />
<property name="ivy.jar.file" location="${ivy.jar.dir}/ivy-${ivy.install.version}.jar" />
Expand Down Expand Up @@ -280,13 +288,7 @@
<mkdir dir="${maven-build-dir}"/>
<copy todir="${maven-build-dir}" encoding="${build.encoding}" outputencoding="${build.encoding}">
<fileset dir="src/main/maven" includes="*.template"/>
<filterset>
<filter token="NAME" value="${ant.project.name}"/>
<filter token="VERSION" value="${version}"/>
<filter token="GROUPID" value="${groupId}"/>
<filter token="ARTIFACTID" value="${artifactId}"/>
<filter token="DESCRIPTION" value="${description}"/>
</filterset>
<filterset refid="artifact-props-filterset"/>
<globmapper from="*.template" to="*"/>
</copy>
<property name="maven.deploy.pom" location="${maven-build-dir}/pom-deploy.xml"/>
Expand Down Expand Up @@ -355,6 +357,7 @@
<copy todir="${documentation-dir}">
<fileset dir="${documentation-dir}/tmp/de/thetaphi/forbiddenapis/gradle" includes="CheckForbiddenApis*.html" />
<mapper type="glob" from="CheckForbiddenApis*" to="gradleApi*"/>
<filterset refid="artifact-props-filterset"/>
<filterchain>
<tokenfilter>
<filetokenizer/>
Expand Down Expand Up @@ -714,11 +717,7 @@
<mkdir dir="${gradle-publish-build-dir}"/>
<copy todir="${gradle-publish-build-dir}" encoding="${build.encoding}" outputencoding="${build.encoding}">
<fileset dir="src/tools/gradle-plugin-portal" includes="*.template"/>
<filterset>
<filter token="VERSION" value="${version}"/>
<filter token="GROUPID" value="${groupId}"/>
<filter token="ARTIFACTID" value="${artifactId}"/>
</filterset>
<filterset refid="artifact-props-filterset"/>
<globmapper from="*.template" to="*"/>
</copy>
<!-- Exceute Gradle and execute task 'publishPlugins': -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,18 +69,23 @@
* For convenience, the plugin also defines an additional task {@code forbiddenApis}
* that runs checks on all source sets.
* <p>
* Installation can be done from your {@code build.gradle} file:
* Installation can be done from your {@code build.gradle} file using the Gradle {@code plugin} DSL:
* <pre>
* plugins {
* id 'de.thetaphi.forbiddenapis' version '@VERSION@'
* }
* </pre>
* Alternatively, you can use the following script snippet if dynamic configuration is required (e.g., for own tasks):
* <pre>
* buildscript {
* repositories {
* mavenCentral()
* }
* dependencies {
* classpath 'de.thetaphi:forbiddenapis:' + FORBIDDEN_APIS_VERSION
* classpath '@GROUPID@:@ARTIFACTID@:@VERSION@'
* }
* }
*
* apply plugin: 'java'
* apply plugin: 'de.thetaphi.forbiddenapis'
* </pre>
* After that you can add the following task configuration closures:
Expand Down

0 comments on commit 4b654b1

Please sign in to comment.