-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathbuild.gradle
120 lines (105 loc) · 3.76 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
114
115
116
117
118
119
120
plugins {
id 'com.android.library'
id 'kotlin-android'
id 'maven-publish'
}
android {
compileSdk 35
compileOptions{
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
// languageVersion provides source compatibility with the specified version of Kotlin
languageVersion = '1.7'
}
defaultConfig {
minSdk 16
targetSdk 35
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
}
publishing {
singleVariant("release") {
withSourcesJar()
withJavadocJar()
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
buildFeatures {
buildConfig = false
}
namespace "org.unifiedpush.android.connector"
}
dependencies {
if (project.plugins.hasPlugin('org.jetbrains.dokka')) {
dokkaHtmlPlugin "org.jetbrains.dokka:android-documentation-plugin:$dokka_version"
dokkaHtmlPartialPlugin "org.jetbrains.dokka:android-documentation-plugin:$dokka_version"
}
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
// We use a local version of apps-webpush until they fix the decryption:
// https://github.com/tink-crypto/tink-java-apps/pull/5
implementation "com.google.crypto.tink:tink:1.16.0" // Remove once merged
// implementation "com.google.crypto.tink:apps-webpush:1.11.0" // Uncomment once merged
compileOnly 'androidx.annotation:annotation-jvm:1.9.1'
}
def releaseGroupId = 'org.unifiedpush.android'
def releaseArtifactId = 'connector'
def releaseVersion = '3.0.4'
tasks.register('printArtifactId') {
group 'Artifact Info'
doLast {
println("artifact=$releaseGroupId:$releaseArtifactId")
}
}
tasks.register("printVersion") {
group 'Artifact Info'
doLast {
println("version=$releaseVersion")
}
}
afterEvaluate {
publishing {
publications {
// Creates a Maven publication called "release".
release(MavenPublication) {
pom {
name = "$releaseGroupId:$releaseArtifactId"
description = 'UnifiedPush connector library'
url = 'https://unifiedpush.org/developers/android/'
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
name = 'S1m'
email = '[email protected]'
organization = 'UnifiedPush'
organizationUrl = 'https://unifiedpush.org/'
}
}
scm {
connection = 'scm:git:git://codeberg.org/UnifiedPush/android-connector.git'
developerConnection = 'scm:git:ssh://codeberg.org:UnifiedPush/android-connector.git'
url = 'https://codeberg.org/UnifiedPush/android-connector'
}
}
// Applies the component for the release build variant.
from components.release
// You can then customize attributes of the publication as shown below.
groupId = releaseGroupId
artifactId = releaseArtifactId
version = releaseVersion
}
}
}
}