1
+ /*
2
+ * Copyright 2025 Harry Timothy Tumalewa
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * https://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import com.vanniktech.maven.publish.SonatypeHost
17
+
18
+ plugins {
19
+ id(" com.android.library" )
20
+ id(" org.jetbrains.kotlin.android" )
21
+ id(" org.jetbrains.dokka" )
22
+ id(" com.vanniktech.maven.publish" )
23
+ }
24
+
25
+ group = " io.github.harrytmthy"
26
+ version = " 1.3.0-alpha01"
27
+
28
+ android {
29
+ namespace = " com.harrytmthy.safebox.cryptography"
30
+ compileSdk = 36
31
+
32
+ defaultConfig {
33
+ minSdk = 23
34
+ testInstrumentationRunner = " androidx.test.runner.AndroidJUnitRunner"
35
+ consumerProguardFiles(" proguard-consumer-rules.pro" )
36
+ }
37
+
38
+ buildTypes {
39
+ release {
40
+ isMinifyEnabled = false
41
+ }
42
+ }
43
+
44
+ compileOptions {
45
+ sourceCompatibility = JavaVersion .VERSION_11
46
+ targetCompatibility = JavaVersion .VERSION_11
47
+ }
48
+
49
+ kotlinOptions {
50
+ jvmTarget = " 11"
51
+ }
52
+ }
53
+
54
+ dependencies {
55
+ implementation(libs.androidx.annotation)
56
+ implementation(libs.bouncy.castle.provider)
57
+
58
+ androidTestImplementation(libs.androidx.test.ext)
59
+ androidTestImplementation(libs.androidx.test.runner)
60
+ androidTestImplementation(libs.kotlin.test)
61
+ }
62
+
63
+ dokka {
64
+ dokkaSourceSets {
65
+ configureEach {
66
+ includes.from(" README.md" )
67
+ }
68
+ }
69
+ }
70
+
71
+ tasks.register<Jar >(" sourcesJar" ) {
72
+ archiveClassifier.set(" sources" )
73
+ from(android.sourceSets[" main" ].java.srcDirs)
74
+ }
75
+
76
+ tasks.register<Jar >(" javadocJar" ) {
77
+ dependsOn(" dokkaJavadoc" )
78
+ archiveClassifier.set(" javadoc" )
79
+ from(tasks.named(" dokkaJavadoc" ).map { it.outputs.files })
80
+ }
81
+
82
+ mavenPublishing {
83
+ publishToMavenCentral(SonatypeHost .CENTRAL_PORTAL )
84
+ signAllPublications()
85
+
86
+ pom {
87
+ name.set(" SafeBox Crypto" )
88
+ description.set(" Cryptography core used by SafeBox, including ChaCha20-Poly1305 and AES-GCM keystore wrapping." )
89
+ url.set(" https://github.com/harrytmthy/safebox" )
90
+
91
+ licenses {
92
+ license {
93
+ name.set(" MIT License" )
94
+ url.set(" https://opensource.org/licenses/MIT" )
95
+ }
96
+ }
97
+
98
+ developers {
99
+ developer {
100
+ id.set(" harrytmthy" )
101
+ name.set(" Harry Timothy Tumalewa" )
102
+ email.set(" harrytmthy@gmail.com" )
103
+ }
104
+ }
105
+ scm {
106
+ connection.set(" scm:git:git://github.com/harrytmthy/safebox.git" )
107
+ developerConnection.set(" scm:git:ssh://github.com:harrytmthy/safebox.git" )
108
+ url.set(" https://github.com/harrytmthy/safebox" )
109
+ }
110
+ }
111
+ }
0 commit comments