| author | Da Risk <da_risk@geekorum.com> | 
| Sun, 16 Apr 2023 15:02:31 -0400 | |
| changeset 12 | dc48b76fbeb8 | 
| parent 7 | b3b2e88f441f | 
| child 19 | 18c078fbc745 | 
| permissions | -rw-r--r-- | 
| 12 | 1  | 
/*  | 
2  | 
* AboutOss is an utility library to retrieve and display  | 
|
3  | 
* opensource licenses in Android applications.  | 
|
4  | 
*  | 
|
5  | 
* Copyright (C) 2023 by Frederic-Charles Barthelery.  | 
|
6  | 
*  | 
|
7  | 
* This file is part of AboutOss.  | 
|
8  | 
*  | 
|
9  | 
* AboutOss is free software: you can redistribute it and/or modify  | 
|
10  | 
* it under the terms of the GNU General Public License as published by  | 
|
11  | 
* the Free Software Foundation, either version 3 of the License, or  | 
|
12  | 
* (at your option) any later version.  | 
|
13  | 
*  | 
|
14  | 
* AboutOss is distributed in the hope that it will be useful,  | 
|
15  | 
* but WITHOUT ANY WARRANTY; without even the implied warranty of  | 
|
16  | 
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the  | 
|
17  | 
* GNU General Public License for more details.  | 
|
18  | 
*  | 
|
19  | 
* You should have received a copy of the GNU General Public License  | 
|
20  | 
* along with AboutOss. If not, see <http://www.gnu.org/licenses/>.  | 
|
21  | 
*/  | 
|
| 0 | 22  | 
plugins {
 | 
23  | 
    id("com.android.library")
 | 
|
24  | 
    kotlin("android")
 | 
|
25  | 
    id("com.geekorum.build.source-license-checker")
 | 
|
| 
7
 
b3b2e88f441f
add README.md and maven publications
 
Da Risk <da_risk@geekorum.com> 
parents: 
6 
diff
changeset
 | 
26  | 
`maven-publish`  | 
| 0 | 27  | 
}  | 
28  | 
||
| 
7
 
b3b2e88f441f
add README.md and maven publications
 
Da Risk <da_risk@geekorum.com> 
parents: 
6 
diff
changeset
 | 
29  | 
group = "com.geekorum.aboutoss"  | 
| 
 
b3b2e88f441f
add README.md and maven publications
 
Da Risk <da_risk@geekorum.com> 
parents: 
6 
diff
changeset
 | 
30  | 
version = "0.0.1"  | 
| 
 
b3b2e88f441f
add README.md and maven publications
 
Da Risk <da_risk@geekorum.com> 
parents: 
6 
diff
changeset
 | 
31  | 
|
| 0 | 32  | 
android {
 | 
33  | 
namespace = "com.geekorum.aboutoss.core"  | 
|
34  | 
compileSdk = 33  | 
|
35  | 
||
36  | 
    defaultConfig {
 | 
|
| 
6
 
67743d62eda9
build: set minSdkVersion to 24
 
Da Risk <da_risk@geekorum.com> 
parents: 
1 
diff
changeset
 | 
37  | 
minSdk = 24  | 
| 0 | 38  | 
|
39  | 
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"  | 
|
40  | 
        consumerProguardFiles("consumer-rules.pro")
 | 
|
| 
7
 
b3b2e88f441f
add README.md and maven publications
 
Da Risk <da_risk@geekorum.com> 
parents: 
6 
diff
changeset
 | 
41  | 
        aarMetadata {
 | 
| 
 
b3b2e88f441f
add README.md and maven publications
 
Da Risk <da_risk@geekorum.com> 
parents: 
6 
diff
changeset
 | 
42  | 
minCompileSdk = 24  | 
| 
 
b3b2e88f441f
add README.md and maven publications
 
Da Risk <da_risk@geekorum.com> 
parents: 
6 
diff
changeset
 | 
43  | 
}  | 
| 0 | 44  | 
}  | 
45  | 
||
46  | 
    buildTypes {
 | 
|
47  | 
        release {
 | 
|
48  | 
isMinifyEnabled = false  | 
|
49  | 
proguardFiles(  | 
|
50  | 
                getDefaultProguardFile("proguard-android-optimize.txt"),
 | 
|
51  | 
"proguard-rules.pro"  | 
|
52  | 
)  | 
|
53  | 
}  | 
|
54  | 
}  | 
|
55  | 
    compileOptions {
 | 
|
56  | 
sourceCompatibility = JavaVersion.VERSION_1_8  | 
|
57  | 
targetCompatibility = JavaVersion.VERSION_1_8  | 
|
58  | 
}  | 
|
59  | 
    kotlinOptions {
 | 
|
60  | 
jvmTarget = "1.8"  | 
|
61  | 
}  | 
|
| 
7
 
b3b2e88f441f
add README.md and maven publications
 
Da Risk <da_risk@geekorum.com> 
parents: 
6 
diff
changeset
 | 
62  | 
|
| 
 
b3b2e88f441f
add README.md and maven publications
 
Da Risk <da_risk@geekorum.com> 
parents: 
6 
diff
changeset
 | 
63  | 
    publishing {
 | 
| 
 
b3b2e88f441f
add README.md and maven publications
 
Da Risk <da_risk@geekorum.com> 
parents: 
6 
diff
changeset
 | 
64  | 
        singleVariant("release") {
 | 
| 
 
b3b2e88f441f
add README.md and maven publications
 
Da Risk <da_risk@geekorum.com> 
parents: 
6 
diff
changeset
 | 
65  | 
withJavadocJar()  | 
| 
 
b3b2e88f441f
add README.md and maven publications
 
Da Risk <da_risk@geekorum.com> 
parents: 
6 
diff
changeset
 | 
66  | 
withSourcesJar()  | 
| 
 
b3b2e88f441f
add README.md and maven publications
 
Da Risk <da_risk@geekorum.com> 
parents: 
6 
diff
changeset
 | 
67  | 
}  | 
| 
 
b3b2e88f441f
add README.md and maven publications
 
Da Risk <da_risk@geekorum.com> 
parents: 
6 
diff
changeset
 | 
68  | 
}  | 
| 0 | 69  | 
}  | 
70  | 
||
71  | 
dependencies {
 | 
|
| 
1
 
137a5da55ed9
core: add LicenseInfoRepository and OssLicenseParser
 
Da Risk <da_risk@geekorum.com> 
parents: 
0 
diff
changeset
 | 
72  | 
implementation(libs.okio)  | 
| 
 
137a5da55ed9
core: add LicenseInfoRepository and OssLicenseParser
 
Da Risk <da_risk@geekorum.com> 
parents: 
0 
diff
changeset
 | 
73  | 
implementation(libs.kotlinx.coroutines)  | 
| 0 | 74  | 
|
75  | 
testImplementation(libs.junit)  | 
|
76  | 
androidTestImplementation(libs.androidx.test.ext.junit)  | 
|
77  | 
androidTestImplementation(libs.espresso.core)  | 
|
| 
7
 
b3b2e88f441f
add README.md and maven publications
 
Da Risk <da_risk@geekorum.com> 
parents: 
6 
diff
changeset
 | 
78  | 
}  | 
| 
 
b3b2e88f441f
add README.md and maven publications
 
Da Risk <da_risk@geekorum.com> 
parents: 
6 
diff
changeset
 | 
79  | 
|
| 
 
b3b2e88f441f
add README.md and maven publications
 
Da Risk <da_risk@geekorum.com> 
parents: 
6 
diff
changeset
 | 
80  | 
publishing {
 | 
| 
 
b3b2e88f441f
add README.md and maven publications
 
Da Risk <da_risk@geekorum.com> 
parents: 
6 
diff
changeset
 | 
81  | 
    publications {
 | 
| 
 
b3b2e88f441f
add README.md and maven publications
 
Da Risk <da_risk@geekorum.com> 
parents: 
6 
diff
changeset
 | 
82  | 
        val pomConfiguration: (MavenPom).() -> Unit = {
 | 
| 
 
b3b2e88f441f
add README.md and maven publications
 
Da Risk <da_risk@geekorum.com> 
parents: 
6 
diff
changeset
 | 
83  | 
            name.set("core")
 | 
| 
 
b3b2e88f441f
add README.md and maven publications
 
Da Risk <da_risk@geekorum.com> 
parents: 
6 
diff
changeset
 | 
84  | 
            description.set("A library to retrieve and display opensource licenses in Android applications")
 | 
| 
 
b3b2e88f441f
add README.md and maven publications
 
Da Risk <da_risk@geekorum.com> 
parents: 
6 
diff
changeset
 | 
85  | 
            licenses {
 | 
| 
 
b3b2e88f441f
add README.md and maven publications
 
Da Risk <da_risk@geekorum.com> 
parents: 
6 
diff
changeset
 | 
86  | 
                license {
 | 
| 
 
b3b2e88f441f
add README.md and maven publications
 
Da Risk <da_risk@geekorum.com> 
parents: 
6 
diff
changeset
 | 
87  | 
                    name.set("GPL-3.0-or-later")
 | 
| 
 
b3b2e88f441f
add README.md and maven publications
 
Da Risk <da_risk@geekorum.com> 
parents: 
6 
diff
changeset
 | 
88  | 
                    url.set("https://www.gnu.org/licenses/gpl-3.0.html")
 | 
| 
 
b3b2e88f441f
add README.md and maven publications
 
Da Risk <da_risk@geekorum.com> 
parents: 
6 
diff
changeset
 | 
89  | 
                    distribution.set("repo")
 | 
| 
 
b3b2e88f441f
add README.md and maven publications
 
Da Risk <da_risk@geekorum.com> 
parents: 
6 
diff
changeset
 | 
90  | 
}  | 
| 
 
b3b2e88f441f
add README.md and maven publications
 
Da Risk <da_risk@geekorum.com> 
parents: 
6 
diff
changeset
 | 
91  | 
}  | 
| 
 
b3b2e88f441f
add README.md and maven publications
 
Da Risk <da_risk@geekorum.com> 
parents: 
6 
diff
changeset
 | 
92  | 
            inceptionYear.set("2023")
 | 
| 
 
b3b2e88f441f
add README.md and maven publications
 
Da Risk <da_risk@geekorum.com> 
parents: 
6 
diff
changeset
 | 
93  | 
}  | 
| 
 
b3b2e88f441f
add README.md and maven publications
 
Da Risk <da_risk@geekorum.com> 
parents: 
6 
diff
changeset
 | 
94  | 
|
| 
 
b3b2e88f441f
add README.md and maven publications
 
Da Risk <da_risk@geekorum.com> 
parents: 
6 
diff
changeset
 | 
95  | 
        register<MavenPublication>("release") {
 | 
| 
 
b3b2e88f441f
add README.md and maven publications
 
Da Risk <da_risk@geekorum.com> 
parents: 
6 
diff
changeset
 | 
96  | 
            afterEvaluate {
 | 
| 
 
b3b2e88f441f
add README.md and maven publications
 
Da Risk <da_risk@geekorum.com> 
parents: 
6 
diff
changeset
 | 
97  | 
from(components["release"])  | 
| 
 
b3b2e88f441f
add README.md and maven publications
 
Da Risk <da_risk@geekorum.com> 
parents: 
6 
diff
changeset
 | 
98  | 
}  | 
| 
 
b3b2e88f441f
add README.md and maven publications
 
Da Risk <da_risk@geekorum.com> 
parents: 
6 
diff
changeset
 | 
99  | 
artifactId = "core"  | 
| 
 
b3b2e88f441f
add README.md and maven publications
 
Da Risk <da_risk@geekorum.com> 
parents: 
6 
diff
changeset
 | 
100  | 
pom(pomConfiguration)  | 
| 
 
b3b2e88f441f
add README.md and maven publications
 
Da Risk <da_risk@geekorum.com> 
parents: 
6 
diff
changeset
 | 
101  | 
}  | 
| 
 
b3b2e88f441f
add README.md and maven publications
 
Da Risk <da_risk@geekorum.com> 
parents: 
6 
diff
changeset
 | 
102  | 
}  | 
| 
 
b3b2e88f441f
add README.md and maven publications
 
Da Risk <da_risk@geekorum.com> 
parents: 
6 
diff
changeset
 | 
103  | 
}  |