-
Notifications
You must be signed in to change notification settings - Fork 9
/
build.gradle
82 lines (70 loc) · 2.28 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
// Copyright 2023 VMware, Inc.
// SPDX-License-Identifier: BSD-2-Clause
plugins {
id 'com.android.library'
id 'kotlin-android'
id 'maven-publish'
// The dokka plugin requires a version or it won't be found.
// Adds the documentation/dokka task.
// id 'org.jetbrains.dokka' version '0.9.18'
id 'org.jetbrains.dokka-android' version '0.9.18'
}
android {
namespace 'com.example.captivewebview'
compileSdk 33
sourceSets {
main.assets.srcDirs += new RelativePath(
false, "Sources", "CaptiveWebView", "Resources"
).getFile(buildscript.sourceFile.parentFile.parentFile.parentFile)
}
defaultConfig {
minSdk 29
targetSdk 33
versionCode 1
versionName captiveWebViewVersion
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile(
'proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.webkit:webkit:1.7.0'
}
// Reference for Maven publication of Android library.
// https://developer.android.com/studio/publish-library/upload-library
//
// The `publish` Gradle task seems to do what the old `uploadArchives` task did.
publishing {
publications {
release(MavenPublication) {
groupId = 'com.example.captivewebview'
artifactId = 'captivewebview'
version = captiveWebViewVersion
afterEvaluate {
from components.release
}
}
}
repositories {
maven {
url = uri(new File(rootDir, '../m2repository'))
}
}
}
// https://www.kotlinresources.com/library/dokka/
// https://github.com/Kotlin/dokka/issues/224#issuecomment-383886215
task dokkaJavadoc(type: org.jetbrains.dokka.gradle.DokkaAndroidTask) {
outputFormat = 'javadoc'
outputDirectory = "$buildDir/dokkaJavadoc"
includes = ['src/documentation/readme.md', 'src/documentation/extra.md']
}
task dokkaHTML(type: org.jetbrains.dokka.gradle.DokkaAndroidTask) {
outputFormat = 'html'
outputDirectory = "$buildDir/dokkaHTML"
includes = ['src/documentation/readme.md', 'src/documentation/extra.md']
}