This repository was archived by the owner on Sep 3, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 31
Expand file tree
/
Copy pathbuild.gradle
More file actions
98 lines (85 loc) · 2.91 KB
/
build.gradle
File metadata and controls
98 lines (85 loc) · 2.91 KB
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
plugins {
id 'com.android.library'
id 'maven-publish'
id 'signing'
}
publishing {
publications {
release(MavenPublication) {
groupId = GROUP_ID
artifactId = ARTIFACT_ID
version = VERSION_NAME
artifact("$rootDir/yanndroid/oneui/build/outputs/aar/oneui-release.aar")
pom {
name = GROUP_ID
description = POM_DESCRIPTION
url = POM_URL
licenses {
license {
name = POM_LICENSE_NAME
url = POM_LICENSE_URL
}
}
developers {
developer {
id = POM_DEVELOPER_ID
name = POM_DEVELOPER_NAME
email = POM_DEVELOPER_EMAIL
}
}
scm {
connection = POM_SCM_CONNECTION
developerConnection = POM_SCM_DEV_CONNECTION
url = POM_SCM_URL
}
}
}
}
}
File propertiesFile = project.rootProject.file('local.properties')
if (propertiesFile.exists()) {
Properties properties = new Properties()
properties.load(propertiesFile.newDataInputStream())
ext["signing.keyId"] = properties.getProperty('signing.keyId')
ext["signing.password"] = properties.getProperty('signing.password')
ext["signing.secretKeyRingFile"] = properties.getProperty('signing.secretKeyRingFile')
} else {
ext["signing.keyId"] = "$System.env.SIGNING_KEYID"
ext["signing.password"] = "$System.env.SIGNING_PASSWORD"
ext["signing.secretKeyRingFile"] = "$System.env.SIGNING_KEYFILE"
}
signing {
sign publishing.publications
}
//gradlew publishToSonatype closeSonatypeStagingRepository
//gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository
android {
compileSdkVersion 31
buildToolsVersion "30.0.3"
defaultConfig {
minSdkVersion 21
targetSdkVersion 30
versionCode = VERSION_CODE.toInteger()
versionName = VERSION_NAME
vectorDrawables.useSupportLibrary = true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
implementation 'androidx.appcompat:appcompat:1.5.0'
implementation 'com.google.android.material:material:1.6.0'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
}