-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
113 lines (99 loc) · 3.47 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
plugins {
id 'com.android.library' version '7.3.1' apply false
}
subprojects {
apply plugin: 'signing'
apply plugin: 'maven-publish'
ext {
libraryName = 'SoundTouch JNI'
libraryVendorName = 'Tianscar'
libraryVersionCode = 12
libraryGroupName = 'com.tianscar.soundtouch'
libraryVersionName = '1.1.1'
librarySourceCompatibility = JavaVersion.VERSION_1_8
libraryTargetCompatibility = JavaVersion.VERSION_1_8
libraryAndroidNamespace = libraryGroupName
libraryAndroidCompileSdk = 33
libraryAndroidMinSdk = 16
libraryAndroidTargetSdk = 33
libraryDescription = 'JNI bindings for SoundTouch'
}
group = libraryGroupName
version = libraryVersionName
repositories {
mavenCentral()
google()
}
}
configure ([project(':core'), project(':javase')]) {
apply plugin: 'java-library'
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
sourceCompatibility = librarySourceCompatibility
targetCompatibility = libraryTargetCompatibility
java {
withJavadocJar()
withSourcesJar()
}
javadoc {
if(JavaVersion.current().isJava9Compatible()) {
options.addBooleanOption('html5', true)
}
}
dependencies {
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.2'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.2'
}
test {
useJUnitPlatform()
}
publishing {
publications {
mavenJava(MavenPublication) {
groupId = libraryGroupName
artifactId = "${rootProject.name}-${project.name}"
version = libraryVersionName
from components.java
pom {
name = libraryName
description = libraryDescription
url = 'https://github.com/Tianscar/soundtouch-jni'
licenses {
license {
name = 'The MIT License'
url = 'https://spdx.org/licenses/MIT.html'
}
}
developers {
developer {
id = 'Tianscar'
name = 'Karstian Lee'
email = '[email protected]'
}
}
scm {
connection = 'scm:git:[email protected]/Tianscar/soundtouch-jni.git'
developerConnection = 'scm:git:[email protected]/Tianscar/soundtouch-jni.git'
url = 'https://github.com/Tianscar/soundtouch-jni'
}
}
}
}
repositories {
maven {
name = "OSSRH"
if (project.version.toString().endsWith("-SNAPSHOT")) {
url = "https://s01.oss.sonatype.org/content/repositories/snapshots"
} else {
url = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
}
credentials {
username = findProperty("ossrhUsername") ?: System.getenv("OSSRH_USERNAME")
password = findProperty("ossrhPassword") ?: System.getenv("OSSRH_PASSWORD")
}
}
}
}
signing {
sign(publishing.publications.mavenJava)
}
}