codemp/dist/java/build.gradle

82 lines
1.7 KiB
Groovy
Raw Normal View History

plugins {
2024-08-08 00:29:54 +02:00
id 'java-library'
id "com.vanniktech.maven.publish" version "0.29.0"
2024-09-18 13:57:07 +02:00
id 'com.google.osdetector' version '1.7.3'
}
group = 'mp.code'
2024-09-18 15:49:56 +02:00
version = '0.0.3'
2024-08-08 00:29:54 +02:00
java {
2024-09-18 13:21:13 +02:00
sourceCompatibility = targetCompatibility = JavaVersion.VERSION_11
}
repositories {
mavenCentral()
}
sourceSets {
main.java.srcDirs = ['src/']
}
dependencies {
compileOnly 'org.projectlombok:lombok:1.18.34'
annotationProcessor 'org.projectlombok:lombok:1.18.34'
}
tasks.register('cargoBuild', Exec) {
workingDir '.'
commandLine 'cargo', 'build', '--release', '--features=java'
}
jar.archiveClassifier = osdetector.classifier
def rustDir = projectDir.toPath()
2024-08-08 00:29:54 +02:00
.parent
.parent
.resolve('target')
.resolve('release')
.toFile()
processResources {
dependsOn cargoBuild
outputs.upToDateWhen { false } // no caching
from(rustDir) {
include('*.dll')
include('*.so')
2024-09-09 20:59:07 +02:00
include('*dylib')
into('natives/')
}
}
import com.vanniktech.maven.publish.SonatypeHost
2024-09-18 13:57:07 +02:00
mavenPublishing {
publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL)
2024-09-18 13:57:07 +02:00
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"
}
}
}