forked from iTwin/mobile-native-android
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
50 lines (47 loc) · 1.88 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
//---------------------------------------------------------------------------------------
//
// Copyright (c) Bentley Systems, Incorporated. All rights reserved.
// See LICENSE.md in the project root for license terms and full copyright notice.
//
//---------------------------------------------------------------------------------------
apply plugin: 'maven-publish'
// Downloads the AAR file from releases using wget so it can then be published to the local Maven repo
task assemble(type: Exec) {
commandLine 'wget', '-qN', 'https://github.com/iTwin/mobile-native-android/releases/download/3.6.0/iTwinAndroidLibrary.aar'
}
// An alternative task for downloading (useful for authenticated downloads)
task assembleGitHub(type: Exec) {
commandLine 'gh', 'release', 'download', '3.6.0', '-p', 'iTwinAndroidLibrary.aar'
}
publishing {
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/itwin/mobile-native-android")
credentials {
username = project.findProperty("gpr.user") ?: System.getenv("USERNAME") ?: "token"
password = project.findProperty("gpr.key") ?: System.getenv("TOKEN")
}
}
}
publications {
maven(MavenPublication) {
groupId = 'com.github.itwin'
version = '3.6.0'
artifact('iTwinAndroidLibrary.aar') {
extension 'aar'
}
pom {
name = 'iTwin.js Mobile Native'
description = 'iTwin.js Native library'
url = 'http://github.com/iTwin/mobile-native-android'
licenses {
license {
name = 'MIT License'
url = 'https://github.com/iTwin/mobile-native-android/blob/main/LICENSE.md'
}
}
}
}
}
}