Skip to content

Commit

Permalink
ci(java): os classifier
Browse files Browse the repository at this point in the history
  • Loading branch information
zaaarf committed Sep 18, 2024
1 parent a26f57d commit 3e68897
Showing 1 changed file with 42 additions and 39 deletions.
81 changes: 42 additions & 39 deletions dist/java/build.gradle
Original file line number Diff line number Diff line change
@@ -1,52 +1,19 @@
import com.vanniktech.maven.publish.SonatypeHost

plugins {
id 'java-library'
id 'maven-publish'
id "com.vanniktech.maven.publish" version "0.29.0"
id 'com.github.johnrengelman.shadow' version '8.1.1'
id 'com.google.osdetector' version '1.7.3'
}

group = 'mp.code'
version = '0.0.1'

java {
sourceCompatibility = targetCompatibility = JavaVersion.VERSION_11
}

import com.vanniktech.maven.publish.SonatypeHost

mavenPublishing {
//publishToMavenCentral(SonatypeHost.S01) // for snapshots
publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL) // central repository
// publishToMavenCentral(SonatypeHost.DEFAULT) // default

signAllPublications()

coordinates(project.group, rootProject.name, project.version)

pom {
name = rootProject.name
description = "A collaborative editor plugin ecosystem"
inceptionYear = "2022"
url = "https://code.mp/"
licenses {
license {
name = "The GNU General Public License v3.0"
url = "https://www.gnu.org/licenses/gpl-3.0.txt"
}
}
developers {
developer {
id = "zaaarf"
name = "zaaarf"
email = "zaaarf@codemp.dev"
}
}
scm {
url = "https://github.com/hexedtech/codemp/"
connection = "scm:git:git://github.com/hexedtech/codemp.git"
developerConnection = "scm:git:ssh://git@github.com/hexedtech/codemp.git"
}
}
withSourcesJar()
withJavadocJar()
}

repositories {
Expand All @@ -65,7 +32,7 @@ dependencies {
}

shadowJar {
archiveClassifier.set('')
jar.archiveClassifier = archiveClassifier = osdetector.classifier
dependencies {
include(dependency('com.github.adamheinrich:native-utils:master-SNAPSHOT'))
}
Expand Down Expand Up @@ -95,3 +62,39 @@ tasks.register('cargoBuild', Exec) {

processResources.dependsOn cargoBuild
build.finalizedBy shadowJar


mavenPublishing {
//publishToMavenCentral(SonatypeHost.S01) // for snapshots
publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL) // central repository
// publishToMavenCentral(SonatypeHost.DEFAULT) // default

signAllPublications()

coordinates(project.group, rootProject.name, project.version)

pom {
name = rootProject.name
description = "A collaborative editor plugin ecosystem"
inceptionYear = "2022"
url = "https://code.mp/"
licenses {
license {
name = "The GNU General Public License v3.0"
url = "https://www.gnu.org/licenses/gpl-3.0.txt"
}
}
developers {
developer {
id = "zaaarf"
name = "zaaarf"
email = "zaaarf@codemp.dev"
}
}
scm {
url = "https://github.com/hexedtech/codemp/"
connection = "scm:git:git://github.com/hexedtech/codemp.git"
developerConnection = "scm:git:ssh://git@github.com/hexedtech/codemp.git"
}
}
}

0 comments on commit 3e68897

Please sign in to comment.