-
Notifications
You must be signed in to change notification settings - Fork 268
/
Copy pathbuild.gradle
112 lines (89 loc) · 2.24 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
buildscript {
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:8.8.1'
}
}
allprojects {
repositories {
google()
mavenCentral()
}
}
apply plugin: 'com.android.library'
apply plugin: 'maven-publish'
ext {
libraryVersion = '2.3.0'
publishedGroupId = 'com.budiyev.android'
}
group = publishedGroupId
version = libraryVersion
android {
namespace = 'com.budiyev.android.codescanner'
defaultConfig {
minSdk = 19
targetSdk = 35
compileSdk = 35
buildToolsVersion = '35.0.1'
versionCode = 61
versionName = libraryVersion
multiDexEnabled = true
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
coreLibraryDesugaringEnabled = true
}
buildTypes {
release {
minifyEnabled = false
proguardFiles(getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro')
}
}
publishing {
singleVariant('release') {
withSourcesJar()
withJavadocJar()
}
}
}
dependencies {
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.1.5'
api 'androidx.multidex:multidex:2.0.1'
api 'com.google.zxing:core:3.3.3'
api 'androidx.annotation:annotation:1.9.1'
}
tasks.register('sourcesJar', Jar) {
archiveClassifier.set('sources')
from android.sourceSets.main.java.srcDirs
}
tasks.register('javadoc', Javadoc) {
options.charSet = 'UTF-8'
failOnError = false
source = android.sourceSets.main.java.sourceFiles
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
}
tasks.register('javadocJar', Jar) {
dependsOn javadoc
archiveClassifier.set('javadoc')
from javadoc.destinationDir
}
artifacts {
archives sourcesJar
archives javadocJar
}
afterEvaluate {
publishing {
publications {
release(MavenPublication) {
from(components['release'])
artifactId = 'code-scanner'
groupId = publishedGroupId
version = libraryVersion
}
}
}
}