reqwest4j/build.gradle

94 lines
2.6 KiB
Groovy
Raw Permalink Normal View History

2023-01-27 23:45:13 +05:30
plugins {
id "java"
id "maven-publish"
2023-01-30 07:38:22 +05:30
id "signing"
2023-01-27 23:45:13 +05:30
id "fr.stardustenterprises.rust.importer" version "3.2.5"
id 'com.github.johnrengelman.shadow' version '8.1.1'
2023-01-27 23:45:13 +05:30
}
repositories {
mavenCentral()
}
dependencies {
rust(project(":reqwest-jni"))
}
// javac -h
tasks.register('generateJniHeaders', JavaCompile) {
classpath = sourceSets.main.compileClasspath
2024-03-29 01:33:56 +05:30
destinationDir file("${layout.buildDirectory}/generated/jni")
2023-01-27 23:45:13 +05:30
source = sourceSets.main.java
options.compilerArgs += [
2024-03-29 01:33:56 +05:30
'-h', file("${layout.buildDirectory}/generated/jni"),
'-d', file("${layout.buildDirectory}/generated/jni-classes"),
2023-01-27 23:45:13 +05:30
]
doLast {
2024-03-29 01:33:56 +05:30
delete file("${layout.buildDirectory}/generated/jni-classes")
2023-01-27 23:45:13 +05:30
}
}
rustImport {
baseDir = "/META-INF/natives"
layout = "hierarchical"
}
java {
withSourcesJar()
withJavadocJar()
2024-03-29 01:33:56 +05:30
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}
2023-01-30 07:38:22 +05:30
signing {
sign publishing.publications
}
group = 'rocks.kavin'
2024-04-02 08:39:44 +05:30
version = '1.0.14'
2023-01-27 23:45:13 +05:30
publishing {
repositories {
maven {
2023-01-30 03:55:49 +05:30
name = "sonatypeStaging"
2023-01-30 03:52:56 +05:30
url = uri("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/")
2023-01-27 23:45:13 +05:30
credentials {
2023-01-30 03:52:56 +05:30
username = project.findProperty("ossrh.user") ?: System.getenv("USERNAME")
password = project.findProperty("ossrh.pass") ?: System.getenv("PASSWORD")
2023-01-27 23:45:13 +05:30
}
}
}
publications {
2023-01-30 03:52:56 +05:30
ossrh(MavenPublication) {
2023-01-27 23:45:13 +05:30
from(components.java)
2023-01-30 04:32:12 +05:30
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 23:45:13 +05:30
}
}
}