mirror of
https://github.com/TeamPiped/reqwest4j.git
synced 2024-08-14 23:54:39 +00:00
62 lines
1.5 KiB
Groovy
62 lines
1.5 KiB
Groovy
plugins {
|
|
id "java"
|
|
id "maven-publish"
|
|
id "fr.stardustenterprises.rust.importer" version "3.2.5"
|
|
id 'com.github.johnrengelman.shadow' version '7.1.2'
|
|
}
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
|
|
dependencies {
|
|
rust(project(":reqwest-jni"))
|
|
}
|
|
|
|
// javac -h
|
|
tasks.register('generateJniHeaders', JavaCompile) {
|
|
classpath = sourceSets.main.compileClasspath
|
|
destinationDir file("${buildDir}/generated/jni")
|
|
source = sourceSets.main.java
|
|
options.compilerArgs += [
|
|
'-h', file("${buildDir}/generated/jni"),
|
|
'-d', file("${buildDir}/generated/jni-classes"),
|
|
]
|
|
doLast {
|
|
delete file("${buildDir}/generated/jni-classes")
|
|
}
|
|
}
|
|
|
|
rustImport {
|
|
baseDir = "/META-INF/natives"
|
|
layout = "hierarchical"
|
|
}
|
|
|
|
java {
|
|
withSourcesJar()
|
|
withJavadocJar()
|
|
}
|
|
|
|
group = 'rocks.kavin'
|
|
version = '1.0'
|
|
sourceCompatibility = JavaVersion.VERSION_17
|
|
targetCompatibility = JavaVersion.VERSION_17
|
|
|
|
publishing {
|
|
repositories {
|
|
maven {
|
|
name = "sonatypeStaging"
|
|
url = uri("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/")
|
|
credentials {
|
|
username = project.findProperty("ossrh.user") ?: System.getenv("USERNAME")
|
|
password = project.findProperty("ossrh.pass") ?: System.getenv("PASSWORD")
|
|
}
|
|
}
|
|
}
|
|
publications {
|
|
ossrh(MavenPublication) {
|
|
from(components.java)
|
|
}
|
|
}
|
|
}
|