Skip to content

Commit 3c66464

Browse files
committed
Add a Gradle example to README.md
1 parent e97b3dc commit 3c66464

File tree

2 files changed

+42
-7
lines changed

2 files changed

+42
-7
lines changed

README.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,40 @@ to learn which properties you need to set (like `mavenReleaseRepoUrl`or
7777

7878
<br/>
7979

80+
## Usage from a Gradle project
81+
82+
If your Gradle project depends on xml-dtd, you can use this project's own Maven
83+
repository in a `repositories` section of your build file:
84+
85+
```groovy
86+
repositories {
87+
maven {
88+
url "https://css4j.github.io/maven/"
89+
mavenContent {
90+
releasesOnly()
91+
}
92+
content {
93+
// Include io.sf.carte as well as other groups under io.sf
94+
includeGroupByRegex 'io\\.sf\\..*'
95+
96+
// Alternative to the regex:
97+
//includeGroup 'io.sf.carte'
98+
}
99+
}
100+
}
101+
```
102+
please use that repository only for the artifact groups that it supplies.
103+
104+
Then, in your `build.gradle` file you can list the dependencies, for example:
105+
106+
```groovy
107+
dependencies {
108+
api 'io.sf.carte:xml-dtd:4.3'
109+
}
110+
```
111+
112+
<br/>
113+
80114
## Software dependencies
81115

82116
In case that you do not use a Gradle or Maven build (which would manage the

RELEASE_HOWTO.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,19 +26,20 @@ For reference, let your copy of the xml-dtd release code be at
2626
`/path/to/xml-dtd`.
2727

2828
2) Use `changes.sh <new-version>` to create a `CHANGES.txt` file with the
29-
changes from the latest tag. For example if you are releasing `4.2.1`:
29+
changes from the latest tag. For example if you are releasing `4.3.1`:
3030

3131
```shell
3232
cd /path/to/xml-dtd
33-
./changes.sh 4.2.1
33+
./changes.sh 4.3.1
3434
```
3535

3636
Edit the resulting `CHANGES.txt` as convenient, to use it as the basis for the
3737
detailed list of changes when you fill the `RELEASE_NOTES.md` and the new
3838
release in Github.
3939

40-
Complete the Release Notes and check whether the dependencies mentioned in the
41-
`README.md` are correct. Commit the changes.
40+
Complete the Release Notes and update the version in the Gradle example of
41+
`README.md`, also check whether the dependencies mentioned there are correct.
42+
Commit the changes.
4243

4344
3) Bump the `version` in the [`build.gradle`](build.gradle) file or remove the
4445
`-SNAPSHOT` suffix as necessary. Commit and push all the changes to the Git
@@ -87,7 +88,7 @@ mv /path/to/css4j-dist/build/docs/javadoc/* /path/to/css4j.github.io/api/latest
8788
```
8889

8990
If the changes to the `css4j.github.io` repo look correct, commit them with a
90-
description like "Latest modular Javadocs after xml-dtd 4.2.1" and push.
91+
description like "Latest modular Javadocs after xml-dtd 4.3.1" and push.
9192

9293
Check whether the ["Examples" CI](https://github.com/css4j/css4j.github.io/actions/workflows/examples.yml)
9394
triggered by that commit to the `css4j.github.io` repository completed
@@ -98,8 +99,8 @@ for example.
9899

99100
```shell
100101
cd /path/to/xml-dtd
101-
git tag -s v4.2.1 -m "Release 4.2.1"
102-
git push origin v4.2.1
102+
git tag -s v4.3.1 -m "Release 4.3.1"
103+
git push origin v4.3.1
103104
```
104105

105106
or `git tag -a` instead of `-s` if you do not plan to sign the tag. But it is

0 commit comments

Comments
 (0)