-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathbuild.gradle
93 lines (82 loc) · 2.64 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
plugins {
id "java"
id "maven-publish"
id "signing"
id "fr.stardustenterprises.rust.importer" version "3.2.5"
id 'com.github.johnrengelman.shadow' version '8.1.1'
}
repositories {
mavenCentral()
}
dependencies {
rust(project(":reqwest-jni"))
}
// javac -h
tasks.register('generateJniHeaders', JavaCompile) {
classpath = sourceSets.main.compileClasspath
destinationDir file("${layout.buildDirectory}/generated/jni")
source = sourceSets.main.java
options.compilerArgs += [
'-h', file("${layout.buildDirectory}/generated/jni"),
'-d', file("${layout.buildDirectory}/generated/jni-classes"),
]
doLast {
delete file("${layout.buildDirectory}/generated/jni-classes")
}
}
rustImport {
baseDir = "/META-INF/natives"
layout = "hierarchical"
}
java {
withSourcesJar()
withJavadocJar()
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}
signing {
sign publishing.publications
}
group = 'rocks.kavin'
version = '1.0.14'
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)
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 = '[email protected]'
}
}
}
}
}
}