diff --git a/README.md b/README.md
index 9254971..fa85d7c 100644
--- a/README.md
+++ b/README.md
@@ -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
@@ -86,7 +86,7 @@ dependencies {
```
-### opus-java
+### opus-java-bom
[ ![version-image][core-version] ][core-download]
@@ -94,25 +94,40 @@ 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.
-
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")
+ compile ("club.minnced:opus-java-natives")
}
```
**Maven**
```xml
-
- club.minnced
- opus-java
- %VERSION%
- pom
-
+
+
+
+ club.minnced
+ opus-java-bom
+ %VERSION%
+ pom
+ import
+
+
+
+
+
+ club.minnced
+ opus-java-api
+
+
+ club.minnced
+ opus-java-natives
+
+
+
```
diff --git a/api/build.gradle b/api/build.gradle
index 64a049b..011f651 100644
--- a/api/build.gradle
+++ b/api/build.gradle
@@ -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'
}
@@ -38,6 +40,8 @@ bintrayUpload {
}
bintray {
+ override = false
+ dryRun = false
user = bintrayUsername
key = bintrayApiKey
publications = ["BintrayRelease"]
diff --git a/build.gradle b/build.gradle
deleted file mode 100644
index 3fc66a9..0000000
--- a/build.gradle
+++ /dev/null
@@ -1,82 +0,0 @@
-plugins {
- id 'com.jfrog.bintray' version '1.8.1'
-}
-
-group = 'club.minnced'
-project.version = '1.0.4'
-
-allprojects {
- repositories {
- jcenter()
- }
-
- apply plugin: 'java-library'
- apply plugin: 'maven-publish'
-
- group = 'club.minnced'
- sourceCompatibility = targetCompatibility = JavaVersion.VERSION_1_8
-}
-
-dependencies {
- compile project(':api')
- compile project(':natives')
-}
-
-task sourcesJar(type: Jar, dependsOn: classes) {
- classifier = 'sources'
-}
-
-build.dependsOn sourcesJar
-
-bintrayUpload {
- dependsOn build
-
- onlyIf { !getProjectProperty("bintrayUsername").empty }
- onlyIf { !getProjectProperty("bintrayApiKey").empty }
-}
-
-bintray {
- user = bintrayUsername
- key = bintrayApiKey
- publications = ["BintrayRelease"]
- pkg {
- repo = 'maven'
- name = project.name
- licenses = ['Apache-2.0']
- vcsUrl = 'https://github.com/discord-java/opus-java.git'
- githubRepo = 'discord-java/opus-java'
- publish = true
- version {
- name = project.version
- vcsTag = project.version
- released = new Date()
- gpg {
- sign = true
- }
- }
- }
-}
-
-String getProjectProperty(String propertyName) {
- return hasProperty(propertyName) ? this.properties[propertyName] : ""
-}
-
-publishing {
- publications {
- BintrayRelease(MavenPublication) {
- groupId project.group
- artifactId project.name
- version version
- pom.withXml {
- def dependenciesNode = asNode().appendNode('dependencies')
- configurations.compile.allDependencies.each {
- def node = dependenciesNode.appendNode('dependency')
- node.appendNode('groupId', it.group)
- node.appendNode('artifactId', it instanceof ProjectDependency ? it.dependencyProject.moduleName : it.name)
- node.appendNode('version' , it.version)
- node.appendNode('scope', 'compile')
- }
- }
- }
- }
-}
diff --git a/build.gradle.kts b/build.gradle.kts
new file mode 100644
index 0000000..f803d06
--- /dev/null
+++ b/build.gradle.kts
@@ -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("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 {
+ 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 {
+ name = project.version.toString()
+ vcsTag = name
+ gpg.isSign = true
+ })
+ })
+}
+
+publishing {
+ publications {
+ register("BintrayRelease") {
+ groupId = project.group as String
+ artifactId = project.name + "-bom"
+ version = version
+ }
+ }
+}
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index a95009c..75b8c7c 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -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
diff --git a/natives/build.gradle b/natives/build.gradle
index 30edb56..6e445a8 100644
--- a/natives/build.gradle
+++ b/natives/build.gradle
@@ -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'
}
@@ -22,6 +24,8 @@ bintrayUpload {
}
bintray {
+ override = false
+ dryRun = false
user = bintrayUsername
key = bintrayApiKey
publications = ["BintrayRelease"]