Skip to content
Closed
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
41 changes: 28 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
[api-download]: https://bintray.com/minndevelopment/maven/opus-java-api/_latestVersion
[natives-version]: https://api.bintray.com/packages/minndevelopment/maven/opus-java-natives/images/download.svg
[natives-download]: https://bintray.com/minndevelopment/maven/opus-java-natives/_latestVersion
[core-version]: https://api.bintray.com/packages/minndevelopment/maven/opus-java/images/download.svg
[core-download]: https://bintray.com/minndevelopment/maven/opus-java/_latestVersion
[core-version]: https://api.bintray.com/packages/minndevelopment/maven/opus-java-bom/images/download.svg
[core-download]: https://bintray.com/minndevelopment/maven/opus-java-bom/_latestVersion

# opus-java

Expand Down Expand Up @@ -86,33 +86,48 @@ dependencies {
</dependency>
```

### opus-java
### opus-java-bom

[ ![version-image][core-version] ][core-download]

Note: Replace `%VERSION%` with the version above.

This artifact depends on **api** and **natives** while not providing
any other features. This can be used if you want all features of this binding.
<br>Note that this is of type `pom` rather than the default `jar`.

**Gradle**

```gradle
dependencies {
compile ('club.minnced:opus-java:%VERSION%@pom') {
transitive = true // gradle defaults to transitive false with @pom
}
compile ("club.minnced:opus-java-bom:%VERSION%")
compile ("club.minnced:opus-java-api")
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Version determined by the bom? Or how does Gradle handle those artifacts without version

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The bom is used to defined the versions of the dependencies and compile applies them

compile ("club.minnced:opus-java-natives")
}
```

**Maven**

```xml
<dependency>
<groupId>club.minnced</groupId>
<artifactId>opus-java</artifactId>
<version>%VERSION%</version>
<type>pom</type>
</dependency>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>club.minnced</groupId>
<artifactId>opus-java-bom</artifactId>
<version>%VERSION%</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>club.minnced</groupId>
<artifactId>opus-java-api</artifactId>
</dependency>
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here i guess

<dependency>
<groupId>club.minnced</groupId>
<artifactId>opus-java-natives</artifactId>
</dependency>
</dependencies>

```
6 changes: 5 additions & 1 deletion api/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@ tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}

project.version = rootProject.version
project.version = "1.0.5"
ext.moduleName = 'opus-java-api'
archivesBaseName = moduleName

sourceCompatibility = targetCompatibility = JavaVersion.VERSION_1_8

dependencies {
implementation 'net.java.dev.jna:jna:4.4.0'
}
Expand All @@ -38,6 +40,8 @@ bintrayUpload {
}

bintray {
override = false
dryRun = false
user = bintrayUsername
key = bintrayApiKey
publications = ["BintrayRelease"]
Expand Down
82 changes: 0 additions & 82 deletions build.gradle

This file was deleted.

71 changes: 71 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
import com.jfrog.bintray.gradle.BintrayExtension

plugins {
`maven-publish`
id("com.jfrog.bintray") version "1.8.1"
id("io.spring.dependency-management") version "1.0.6.RELEASE"
}

group = "club.minnced"
version = "1.0.5"

allprojects {
repositories {
jcenter()
}

apply(plugin="java-library")
apply(plugin="maven-publish")

group = "club.minnced"
}

dependencyManagement {
dependencies {
dependency("$group:$name-api:$version")
dependency("$group:$name-natives:$version")
}
}

val sourcesJar = task<Jar>("sourcesJar") {
classifier = "sources"
}

val bintrayUpload: Task by tasks
val build: Task by tasks
build.dependsOn(sourcesJar)

bintrayUpload.apply {
dependsOn(build)
}

bintray {
dryRun = false
override = false
user = properties["bintrayUsername"] as String
key = properties["bintrayApiKey"] as String
setPublications("BintrayRelease")
pkg(delegateClosureOf<BintrayExtension.PackageConfig> {
repo = "maven"
name = project.name + "-bom"
setLicenses("Apache-2.0")
vcsUrl = "https://github.com/discord-java/opus-java.git"
githubRepo = "discord-java/opus-java"
publish = true
version(delegateClosureOf<BintrayExtension.VersionConfig> {
name = project.version.toString()
vcsTag = name
gpg.isSign = true
})
})
}

publishing {
publications {
register<MavenPublication>("BintrayRelease") {
groupId = project.group as String
artifactId = project.name + "-bom"
version = version
}
}
}
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.9-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-5.0-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
6 changes: 5 additions & 1 deletion natives/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ plugins {
id 'com.jfrog.bintray'
}

project.version = rootProject.version
project.version = "1.0.5"
ext.moduleName = 'opus-java-natives'
archivesBaseName = moduleName

sourceCompatibility = targetCompatibility = JavaVersion.VERSION_1_8

task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
}
Expand All @@ -22,6 +24,8 @@ bintrayUpload {
}

bintray {
override = false
dryRun = false
user = bintrayUsername
key = bintrayApiKey
publications = ["BintrayRelease"]
Expand Down