mirror of
https://github.com/hexedtech/codemp.git
synced 2024-11-22 15:24:48 +01:00
alemi
c329fa49cb
packages take some time to appear, 10~30 mins i read? so idk ill find out tomorrow if this worked
97 lines
2.1 KiB
Groovy
97 lines
2.1 KiB
Groovy
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'
|
|
}
|
|
|
|
group = 'mp.code'
|
|
version = '0.0.1'
|
|
|
|
java {
|
|
sourceCompatibility = targetCompatibility = JavaVersion.VERSION_1_8
|
|
}
|
|
|
|
import com.vanniktech.maven.publish.SonatypeHost
|
|
|
|
mavenPublishing {
|
|
// publishToMavenCentral(SonatypeHost.S01) // for snapshots
|
|
publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL) // central repository
|
|
// publishToMavenCentral(SonatypeHost.DEFAULT) // ????
|
|
|
|
signAllPublications()
|
|
|
|
coordinates("mp.code", "codemp", "0.0.1")
|
|
|
|
pom {
|
|
name = "codemp"
|
|
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"
|
|
distribution = "https://www.gnu.org/licenses/gpl-3.0.txt"
|
|
}
|
|
}
|
|
developers {
|
|
developer {
|
|
id = "zaaarf"
|
|
name = "zaaarf"
|
|
}
|
|
}
|
|
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"
|
|
}
|
|
}
|
|
}
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
maven { url 'https://jitpack.io' }
|
|
}
|
|
|
|
sourceSets {
|
|
main.java.srcDirs = ['src/']
|
|
}
|
|
|
|
dependencies {
|
|
implementation 'com.github.adamheinrich:native-utils:master-SNAPSHOT'
|
|
compileOnly 'org.projectlombok:lombok:1.18.34'
|
|
annotationProcessor 'org.projectlombok:lombok:1.18.34'
|
|
}
|
|
|
|
shadowJar {
|
|
archiveClassifier.set('')
|
|
dependencies {
|
|
include(dependency('com.github.adamheinrich:native-utils:master-SNAPSHOT'))
|
|
}
|
|
}
|
|
|
|
def rustDir = projectDir.toPath()
|
|
.parent
|
|
.parent
|
|
.resolve('target')
|
|
.resolve('release')
|
|
.toFile()
|
|
|
|
processResources {
|
|
outputs.upToDateWhen { false } // no caching
|
|
from(rustDir) {
|
|
include('*.dll')
|
|
include('*.so')
|
|
include('*dylib')
|
|
into('natives/')
|
|
}
|
|
}
|
|
|
|
tasks.register('cargoBuild', Exec) {
|
|
workingDir '.'
|
|
commandLine 'cargo', 'build', '--release', '--features=java'
|
|
}
|
|
|
|
processResources.dependsOn cargoBuild
|
|
build.finalizedBy shadowJar
|