-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
107 lines (93 loc) · 3.79 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
apply plugin: 'com.android.library'
apply plugin: "maven-publish"
group = "eu.interopehrate"
version = "0.2.2"
android {
compileSdkVersion 30
buildToolsVersion "30.0.3"
defaultConfig {
minSdkVersion 16
targetSdkVersion 30
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles 'consumer-rules.pro'
// Required when setting minSdkVersion to 20 or lower
multiDexEnabled = true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
// Flag to enable support for the new language APIs
coreLibraryDesugaringEnabled = true
// Sets Java compatibility to Java 8
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.2.0'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.11.0'
implementation 'io.jsonwebtoken:jjwt:0.9.1'
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:1.1.5")
}
/*
* Configuration of a task, for publishing mrd2sm.arr into a Nexus Repository
*/
publishing {
publications {
mavenJava(MavenPublication) {
artifactId = "mr2dsm"
artifact("build/outputs/aar/$archivesBaseName" + "-release.aar") {
// artifact("build/outputs/aar/lib-debug.aar") {
extension "aar"
// adds dependencies to the generated POM
pom.withXml {
def dependenciesNode = asNode().appendNode('dependencies')
//Iterate over the dependencies, adding a <dependency> node for each
configurations.releaseCompileClasspath.allDependencies.each {
if (it.group != null && it.name != null) {
def dependencyNode = dependenciesNode.appendNode('dependency')
dependencyNode.appendNode('groupId', it.group)
dependencyNode.appendNode('artifactId', it.name)
dependencyNode.appendNode('version', it.version)
//If there are any exclusions in dependency
if (it.excludeRules.size() > 0) {
def exclusionsNode = dependencyNode.appendNode('exclusions')
it.excludeRules.each { rule ->
def exclusionNode = exclusionsNode.appendNode('exclusion')
exclusionNode.appendNode('groupId', rule.group)
exclusionNode.appendNode('artifactId', rule.module)
}
}
}
}
}
}
// descriptive information to add to the generated POM file
pom {
name = 'MR2DSM Library'
description = 'Android library (developed by InteropEHRate consortium) for remote secruity needs.'
url = 'http://www.interopehrate.eu'
}
}
}
repositories {
maven {
name "IEHR-Nexus"
url "http://213.249.46.206:8081/repository/maven-releases/"
credentials {
username ""
password ""
}
}
}
}