2023-01-27 18:15:13 +00:00
|
|
|
plugins {
|
|
|
|
id "java"
|
|
|
|
id "maven-publish"
|
2023-01-30 02:08:22 +00:00
|
|
|
id "signing"
|
2023-01-27 18:15:13 +00:00
|
|
|
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"
|
|
|
|
}
|
|
|
|
|
2023-01-29 21:53:34 +00:00
|
|
|
java {
|
|
|
|
withSourcesJar()
|
|
|
|
withJavadocJar()
|
|
|
|
}
|
|
|
|
|
2023-01-30 02:08:22 +00:00
|
|
|
signing {
|
|
|
|
sign publishing.publications
|
|
|
|
}
|
|
|
|
|
2023-01-29 21:53:34 +00:00
|
|
|
group = 'rocks.kavin'
|
2023-08-12 17:58:57 +00:00
|
|
|
version = '1.0.9'
|
2023-01-27 18:15:13 +00:00
|
|
|
sourceCompatibility = JavaVersion.VERSION_17
|
|
|
|
targetCompatibility = JavaVersion.VERSION_17
|
|
|
|
|
|
|
|
publishing {
|
|
|
|
repositories {
|
|
|
|
maven {
|
2023-01-29 22:25:49 +00:00
|
|
|
name = "sonatypeStaging"
|
2023-01-29 22:22:56 +00:00
|
|
|
url = uri("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/")
|
2023-01-27 18:15:13 +00:00
|
|
|
credentials {
|
2023-01-29 22:22:56 +00:00
|
|
|
username = project.findProperty("ossrh.user") ?: System.getenv("USERNAME")
|
|
|
|
password = project.findProperty("ossrh.pass") ?: System.getenv("PASSWORD")
|
2023-01-27 18:15:13 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
publications {
|
2023-01-29 22:22:56 +00:00
|
|
|
ossrh(MavenPublication) {
|
2023-01-27 18:15:13 +00:00
|
|
|
from(components.java)
|
2023-01-29 23:02:12 +00:00
|
|
|
pom {
|
|
|
|
name = 'reqwest4j'
|
|
|
|
packaging 'jar'
|
|
|
|
description = 'Java bindings to Reqwest with jni-rs for use in Piped\'s backend!'
|
|
|
|
url = 'https://github.com/TeamPiped/reqwest4j'
|
|
|
|
|
|
|
|
scm {
|
|
|
|
connection = 'scm:git:git://github.com/TeamPiped/reqwest4j.git'
|
|
|
|
developerConnection = 'scm:git:https://github.com/TeamPiped/reqwest4j.git'
|
|
|
|
url = 'https://github.com/TeamPiped/reqwest4j'
|
|
|
|
}
|
|
|
|
|
|
|
|
licenses {
|
|
|
|
license {
|
|
|
|
name = 'MIT License'
|
|
|
|
url = 'https://raw.githubusercontent.com/TeamPiped/reqwest4j/main/LICENSE'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
developers {
|
|
|
|
developer {
|
|
|
|
id = 'kavin'
|
|
|
|
name = 'Kavin'
|
|
|
|
email = 'kavin@kavin.rocks'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2023-01-27 18:15:13 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|