Skip to content

Commit

Permalink
docs: Document the use of Jitpack (#333)
Browse files Browse the repository at this point in the history
Fixes #312 (this has been working, but was not documented)
Fixes #311
  • Loading branch information
rhwood authored May 27, 2024
1 parent 781a697 commit 9824527
Show file tree
Hide file tree
Showing 3 changed files with 105 additions and 10 deletions.
56 changes: 52 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ JSplitButton

A split button control for Java Swing.

[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.alexandriasoftware.swing/jsplitbutton/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.alexandriasoftware.swing/jsplitbutton)
[![Javadocs](https://www.javadoc.io/badge/com.alexandriasoftware.swing/jsplitbutton.svg)](https://www.javadoc.io/doc/com.alexandriasoftware.swing/jsplitbutton)
[![JitPack](https://jitpack.io/v/rhwood/jsplitbutton.svg)](https://jitpack.io/#rhwood/jsplitbutton)
[![Javadocs](https://www.javadoc.io/badge/com.alexandriasoftware.swing/jsplitbutton.svg)](https://jitpack.io/com/github/USER/REPO/latest/javadoc/)
[![Build](https://github.com/rhwood/jsplitbutton/actions/workflows/build.yml/badge.svg)](https://github.com/rhwood/jsplitbutton/actions/workflows/build.yml)
[![CodeQL](https://github.com/rhwood/jsplitbutton/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/rhwood/jsplitbutton/actions/workflows/codeql-analysis.yml)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=rhwood_jsplitbutton&metric=alert_status)](https://sonarcloud.io/dashboard?id=rhwood_jsplitbutton)
Expand Down Expand Up @@ -77,12 +77,60 @@ splitButton.add(popupMenu);
panel.add(splitButton);
```

## Including in your project

### Gradle

1. Add the Jitpack repository to `build.gradle`
```
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
}
```

2. Add the dependency
```
dependencies {
implementation 'com.github.rhwood:jsplitbutton:Tag'
}
```

### Maven

1. Add the Jitpack repository to `pom.xml`
```
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
```

2. Add the dependency
```
<dependency>
<groupId>com.github.rhwood</groupId>
<artifactId>jsplitbutton</artifactId>
<version>Tag</version>
</dependency>
```

## Migrating from Version 1.x to 2.0 or Newer

1. Update repositories (version 1.x was published at Maven Central, version 2.0 or newer are published at GitHub Packages and Jitpack.io)
2. Change the Group ID in Maven from `com.alexandriasoftware.swing` to `com.github.rhwood.jsplitbutton`
1. Add the Jitpack.io repositoras shown above
2. Change the Group ID in `pom.xml` or `build.gradle` from `com.alexandriasoftware.swing` to `com.github.rhwood.jsplitbutton`
3. Change the package name in imports from `com.alexandriasoftware.swing` to `com.github.rhwood.jsplitbutton`

## License

- Versions 1.3.1 and newer are released under the [Apache 2.0 License](http://www.apache.org/licenses/LICENSE-2.0)
- Version 1.3.0 is released under the [GNU Public License 2.0](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html)

## Prior History

* [Original development](http://code.google.com/p/jsplitbutton) by Naveed Quadri in 2012
Expand Down
6 changes: 2 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,10 @@ limitations under the License.
<id>github</id>
<url>scm:git:https://github.com/rhwood/jsplitbutton.git</url>
</site>
<!--
<snapshotRepository>
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</snapshotRepository>
-->
<repository>
<id>github</id>
<name>GitHub Packages</name>
Expand Down
53 changes: 51 additions & 2 deletions src/site/markdown/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

A Split Button control for Java Swing.

[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.alexandriasoftware.swing/jsplitbutton/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.alexandriasoftware.swing/jsplitbutton)
[![Javadocs](https://www.javadoc.io/badge/com.alexandriasoftware.swing/jsplitbutton.svg)](https://www.javadoc.io/doc/com.alexandriasoftware.swing/jsplitbutton)
[![JitPack](https://jitpack.io/v/rhwood/jsplitbutton.svg)](https://jitpack.io/#rhwood/jsplitbutton)
[![Javadocs](https://www.javadoc.io/badge/com.alexandriasoftware.swing/jsplitbutton.svg)](https://jitpack.io/com/github/USER/REPO/latest/javadoc/)
[![Build](https://github.com/rhwood/jinputvalidator/actions/workflows/build.yml/badge.svg)](https://github.com/rhwood/jinputvalidator/actions/workflows/build.yml)
[![CodeQL](https://github.com/rhwood/jinputvalidator/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/rhwood/jinputvalidator/actions/workflows/codeql-analysis.yml)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=rhwood_jinputvalidator&metric=alert_status)](https://sonarcloud.io/dashboard?id=rhwood_jinputvalidator)
Expand Down Expand Up @@ -52,6 +52,55 @@ splitButton.add(popupMenu);
panel.add(splitButton);
```

## Including in your project

### Gradle

1. Add the Jitpack repository to `build.gradle`
```
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
}
```

2. Add the dependency
```
dependencies {
implementation 'com.github.rhwood:jsplitbutton:Tag'
}
```

### Maven

1. Add the Jitpack repository to `pom.xml`
```
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
```

2. Add the dependency
```
<dependency>
<groupId>com.github.rhwood</groupId>
<artifactId>jsplitbutton</artifactId>
<version>Tag</version>
</dependency>
```

## Migrating from Version 1.x to 2.0 or Newer

1. Add the Jitpack.io repositoras shown above
2. Change the Group ID in `pom.xml` or `build.gradle` from `com.alexandriasoftware.swing` to `com.github.rhwood.jsplitbutton`
3. Change the package name in imports from `com.alexandriasoftware.swing` to `com.github.rhwood.jsplitbutton`

## License

- Versions 1.3.1 and newer are released under the [Apache 2.0 License](http://www.apache.org/licenses/LICENSE-2.0)
Expand Down

0 comments on commit 9824527

Please sign in to comment.