| author | Da Risk <da_risk@geekorum.com> | 
| Tue, 24 Jun 2025 15:18:18 -0400 | |
| changeset 103 | c78c87a77df2 | 
| parent 102 | 47363ef81dc3 | 
| permissions | -rw-r--r-- | 
| 15 | 1  | 
/*  | 
2  | 
* AboutOss is an utility library to retrieve and display  | 
|
3  | 
* opensource licenses in Android applications.  | 
|
4  | 
*  | 
|
| 
34
 
ce299aacc068
build: update license headers
 
Da Risk <da_risk@geekorum.com> 
parents: 
31 
diff
changeset
 | 
5  | 
* Copyright (C) 2023-2025 by Frederic-Charles Barthelery.  | 
| 15 | 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  | 
*/  | 
|
| 
44
 
7732a7112b93
sample: start conversion to a kotlin multiplatform project
 
Da Risk <da_risk@geekorum.com> 
parents: 
34 
diff
changeset
 | 
22  | 
import org.jetbrains.kotlin.gradle.dsl.JvmTarget  | 
| 
 
7732a7112b93
sample: start conversion to a kotlin multiplatform project
 
Da Risk <da_risk@geekorum.com> 
parents: 
34 
diff
changeset
 | 
23  | 
|
| 15 | 24  | 
@Suppress("DSL_SCOPE_VIOLATION") // TODO: Remove once KTIJ-19369 is fixed
 | 
25  | 
plugins {
 | 
|
26  | 
    id("com.android.application")
 | 
|
| 
44
 
7732a7112b93
sample: start conversion to a kotlin multiplatform project
 
Da Risk <da_risk@geekorum.com> 
parents: 
34 
diff
changeset
 | 
27  | 
    kotlin("multiplatform")
 | 
| 15 | 28  | 
    id("com.geekorum.build.source-license-checker")
 | 
| 
72
 
746669e015f9
build: cleanup libs.versions.toml
 
Da Risk <da_risk@geekorum.com> 
parents: 
66 
diff
changeset
 | 
29  | 
alias(libs.plugins.kotlin.compose)  | 
| 
 
746669e015f9
build: cleanup libs.versions.toml
 
Da Risk <da_risk@geekorum.com> 
parents: 
66 
diff
changeset
 | 
30  | 
alias(libs.plugins.jetbrains.compose.multiplatform)  | 
| 
 
746669e015f9
build: cleanup libs.versions.toml
 
Da Risk <da_risk@geekorum.com> 
parents: 
66 
diff
changeset
 | 
31  | 
alias(libs.plugins.kotlinx.serialization)  | 
| 
18
 
ac393491d2eb
sample: complete sample application
 
Da Risk <da_risk@geekorum.com> 
parents: 
15 
diff
changeset
 | 
32  | 
alias(libs.plugins.google.gms.oss.license)  | 
| 
 
ac393491d2eb
sample: complete sample application
 
Da Risk <da_risk@geekorum.com> 
parents: 
15 
diff
changeset
 | 
33  | 
}  | 
| 
 
ac393491d2eb
sample: complete sample application
 
Da Risk <da_risk@geekorum.com> 
parents: 
15 
diff
changeset
 | 
34  | 
|
| 
 
ac393491d2eb
sample: complete sample application
 
Da Risk <da_risk@geekorum.com> 
parents: 
15 
diff
changeset
 | 
35  | 
// workaround bug https://issuetracker.google.com/issues/275534543  | 
| 
 
ac393491d2eb
sample: complete sample application
 
Da Risk <da_risk@geekorum.com> 
parents: 
15 
diff
changeset
 | 
36  | 
buildscript {
 | 
| 
 
ac393491d2eb
sample: complete sample application
 
Da Risk <da_risk@geekorum.com> 
parents: 
15 
diff
changeset
 | 
37  | 
    dependencies {
 | 
| 102 | 38  | 
        classpath("com.android.tools.build:gradle:8.13.0")
 | 
| 
18
 
ac393491d2eb
sample: complete sample application
 
Da Risk <da_risk@geekorum.com> 
parents: 
15 
diff
changeset
 | 
39  | 
}  | 
| 15 | 40  | 
}  | 
41  | 
||
| 
44
 
7732a7112b93
sample: start conversion to a kotlin multiplatform project
 
Da Risk <da_risk@geekorum.com> 
parents: 
34 
diff
changeset
 | 
42  | 
kotlin {
 | 
| 
 
7732a7112b93
sample: start conversion to a kotlin multiplatform project
 
Da Risk <da_risk@geekorum.com> 
parents: 
34 
diff
changeset
 | 
43  | 
    androidTarget {
 | 
| 
 
7732a7112b93
sample: start conversion to a kotlin multiplatform project
 
Da Risk <da_risk@geekorum.com> 
parents: 
34 
diff
changeset
 | 
44  | 
        compilerOptions {
 | 
| 
 
7732a7112b93
sample: start conversion to a kotlin multiplatform project
 
Da Risk <da_risk@geekorum.com> 
parents: 
34 
diff
changeset
 | 
45  | 
jvmTarget.set(JvmTarget.JVM_17)  | 
| 
 
7732a7112b93
sample: start conversion to a kotlin multiplatform project
 
Da Risk <da_risk@geekorum.com> 
parents: 
34 
diff
changeset
 | 
46  | 
}  | 
| 
 
7732a7112b93
sample: start conversion to a kotlin multiplatform project
 
Da Risk <da_risk@geekorum.com> 
parents: 
34 
diff
changeset
 | 
47  | 
}  | 
| 
 
7732a7112b93
sample: start conversion to a kotlin multiplatform project
 
Da Risk <da_risk@geekorum.com> 
parents: 
34 
diff
changeset
 | 
48  | 
|
| 
47
 
246422783c0c
sample: extract base of sample to common. start implementing desktop
 
Da Risk <da_risk@geekorum.com> 
parents: 
44 
diff
changeset
 | 
49  | 
    jvm("desktop") {
 | 
| 
 
246422783c0c
sample: extract base of sample to common. start implementing desktop
 
Da Risk <da_risk@geekorum.com> 
parents: 
44 
diff
changeset
 | 
50  | 
        mainRun {
 | 
| 
 
246422783c0c
sample: extract base of sample to common. start implementing desktop
 
Da Risk <da_risk@geekorum.com> 
parents: 
44 
diff
changeset
 | 
51  | 
mainClass = "com.geekorum.aboutoss.sampleapp.MainKt"  | 
| 
 
246422783c0c
sample: extract base of sample to common. start implementing desktop
 
Da Risk <da_risk@geekorum.com> 
parents: 
44 
diff
changeset
 | 
52  | 
}  | 
| 
 
246422783c0c
sample: extract base of sample to common. start implementing desktop
 
Da Risk <da_risk@geekorum.com> 
parents: 
44 
diff
changeset
 | 
53  | 
}  | 
| 
44
 
7732a7112b93
sample: start conversion to a kotlin multiplatform project
 
Da Risk <da_risk@geekorum.com> 
parents: 
34 
diff
changeset
 | 
54  | 
|
| 
 
7732a7112b93
sample: start conversion to a kotlin multiplatform project
 
Da Risk <da_risk@geekorum.com> 
parents: 
34 
diff
changeset
 | 
55  | 
listOf(  | 
| 
 
7732a7112b93
sample: start conversion to a kotlin multiplatform project
 
Da Risk <da_risk@geekorum.com> 
parents: 
34 
diff
changeset
 | 
56  | 
iosX64(),  | 
| 
 
7732a7112b93
sample: start conversion to a kotlin multiplatform project
 
Da Risk <da_risk@geekorum.com> 
parents: 
34 
diff
changeset
 | 
57  | 
iosArm64(),  | 
| 
 
7732a7112b93
sample: start conversion to a kotlin multiplatform project
 
Da Risk <da_risk@geekorum.com> 
parents: 
34 
diff
changeset
 | 
58  | 
iosSimulatorArm64(),  | 
| 
 
7732a7112b93
sample: start conversion to a kotlin multiplatform project
 
Da Risk <da_risk@geekorum.com> 
parents: 
34 
diff
changeset
 | 
59  | 
    ).forEach { iosTarget ->
 | 
| 
 
7732a7112b93
sample: start conversion to a kotlin multiplatform project
 
Da Risk <da_risk@geekorum.com> 
parents: 
34 
diff
changeset
 | 
60  | 
        iosTarget.binaries.framework {
 | 
| 
 
7732a7112b93
sample: start conversion to a kotlin multiplatform project
 
Da Risk <da_risk@geekorum.com> 
parents: 
34 
diff
changeset
 | 
61  | 
baseName = "aboutoss-sample-app"  | 
| 
 
7732a7112b93
sample: start conversion to a kotlin multiplatform project
 
Da Risk <da_risk@geekorum.com> 
parents: 
34 
diff
changeset
 | 
62  | 
isStatic = true  | 
| 
 
7732a7112b93
sample: start conversion to a kotlin multiplatform project
 
Da Risk <da_risk@geekorum.com> 
parents: 
34 
diff
changeset
 | 
63  | 
}  | 
| 
 
7732a7112b93
sample: start conversion to a kotlin multiplatform project
 
Da Risk <da_risk@geekorum.com> 
parents: 
34 
diff
changeset
 | 
64  | 
}  | 
| 
 
7732a7112b93
sample: start conversion to a kotlin multiplatform project
 
Da Risk <da_risk@geekorum.com> 
parents: 
34 
diff
changeset
 | 
65  | 
|
| 
 
7732a7112b93
sample: start conversion to a kotlin multiplatform project
 
Da Risk <da_risk@geekorum.com> 
parents: 
34 
diff
changeset
 | 
66  | 
    sourceSets {
 | 
| 
 
7732a7112b93
sample: start conversion to a kotlin multiplatform project
 
Da Risk <da_risk@geekorum.com> 
parents: 
34 
diff
changeset
 | 
67  | 
        commonMain.dependencies {
 | 
| 
 
7732a7112b93
sample: start conversion to a kotlin multiplatform project
 
Da Risk <da_risk@geekorum.com> 
parents: 
34 
diff
changeset
 | 
68  | 
            implementation(project(":core"))
 | 
| 
 
7732a7112b93
sample: start conversion to a kotlin multiplatform project
 
Da Risk <da_risk@geekorum.com> 
parents: 
34 
diff
changeset
 | 
69  | 
            implementation(project(":ui:common"))
 | 
| 
 
7732a7112b93
sample: start conversion to a kotlin multiplatform project
 
Da Risk <da_risk@geekorum.com> 
parents: 
34 
diff
changeset
 | 
70  | 
            implementation(project(":ui:material2"))
 | 
| 
 
7732a7112b93
sample: start conversion to a kotlin multiplatform project
 
Da Risk <da_risk@geekorum.com> 
parents: 
34 
diff
changeset
 | 
71  | 
            implementation(project(":ui:material3"))
 | 
| 
 
7732a7112b93
sample: start conversion to a kotlin multiplatform project
 
Da Risk <da_risk@geekorum.com> 
parents: 
34 
diff
changeset
 | 
72  | 
implementation(compose.material3)  | 
| 
 
7732a7112b93
sample: start conversion to a kotlin multiplatform project
 
Da Risk <da_risk@geekorum.com> 
parents: 
34 
diff
changeset
 | 
73  | 
implementation(compose.components.resources)  | 
| 
 
7732a7112b93
sample: start conversion to a kotlin multiplatform project
 
Da Risk <da_risk@geekorum.com> 
parents: 
34 
diff
changeset
 | 
74  | 
implementation(compose.components.uiToolingPreview)  | 
| 
72
 
746669e015f9
build: cleanup libs.versions.toml
 
Da Risk <da_risk@geekorum.com> 
parents: 
66 
diff
changeset
 | 
75  | 
implementation(libs.jetbrains.androidx.lifecycle.viewModelCompose)  | 
| 
44
 
7732a7112b93
sample: start conversion to a kotlin multiplatform project
 
Da Risk <da_risk@geekorum.com> 
parents: 
34 
diff
changeset
 | 
76  | 
}  | 
| 
 
7732a7112b93
sample: start conversion to a kotlin multiplatform project
 
Da Risk <da_risk@geekorum.com> 
parents: 
34 
diff
changeset
 | 
77  | 
|
| 
 
7732a7112b93
sample: start conversion to a kotlin multiplatform project
 
Da Risk <da_risk@geekorum.com> 
parents: 
34 
diff
changeset
 | 
78  | 
        androidMain.dependencies {
 | 
| 
 
7732a7112b93
sample: start conversion to a kotlin multiplatform project
 
Da Risk <da_risk@geekorum.com> 
parents: 
34 
diff
changeset
 | 
79  | 
api(libs.androidx.activity)  | 
| 
 
7732a7112b93
sample: start conversion to a kotlin multiplatform project
 
Da Risk <da_risk@geekorum.com> 
parents: 
34 
diff
changeset
 | 
80  | 
implementation(dependencies.enforcedPlatform(libs.androidx.compose.bom))  | 
| 
 
7732a7112b93
sample: start conversion to a kotlin multiplatform project
 
Da Risk <da_risk@geekorum.com> 
parents: 
34 
diff
changeset
 | 
81  | 
implementation(libs.androidx.activity.compose)  | 
| 
 
7732a7112b93
sample: start conversion to a kotlin multiplatform project
 
Da Risk <da_risk@geekorum.com> 
parents: 
34 
diff
changeset
 | 
82  | 
implementation(libs.geekdroid)  | 
| 
47
 
246422783c0c
sample: extract base of sample to common. start implementing desktop
 
Da Risk <da_risk@geekorum.com> 
parents: 
44 
diff
changeset
 | 
83  | 
}  | 
| 
 
246422783c0c
sample: extract base of sample to common. start implementing desktop
 
Da Risk <da_risk@geekorum.com> 
parents: 
44 
diff
changeset
 | 
84  | 
|
| 
 
246422783c0c
sample: extract base of sample to common. start implementing desktop
 
Da Risk <da_risk@geekorum.com> 
parents: 
44 
diff
changeset
 | 
85  | 
        val desktopMain by getting {
 | 
| 
 
246422783c0c
sample: extract base of sample to common. start implementing desktop
 
Da Risk <da_risk@geekorum.com> 
parents: 
44 
diff
changeset
 | 
86  | 
            dependencies {
 | 
| 
 
246422783c0c
sample: extract base of sample to common. start implementing desktop
 
Da Risk <da_risk@geekorum.com> 
parents: 
44 
diff
changeset
 | 
87  | 
implementation(compose.desktop.currentOs)  | 
| 
 
246422783c0c
sample: extract base of sample to common. start implementing desktop
 
Da Risk <da_risk@geekorum.com> 
parents: 
44 
diff
changeset
 | 
88  | 
implementation(libs.kotlinx.coroutines.swing)  | 
| 
 
246422783c0c
sample: extract base of sample to common. start implementing desktop
 
Da Risk <da_risk@geekorum.com> 
parents: 
44 
diff
changeset
 | 
89  | 
}  | 
| 
44
 
7732a7112b93
sample: start conversion to a kotlin multiplatform project
 
Da Risk <da_risk@geekorum.com> 
parents: 
34 
diff
changeset
 | 
90  | 
}  | 
| 
 
7732a7112b93
sample: start conversion to a kotlin multiplatform project
 
Da Risk <da_risk@geekorum.com> 
parents: 
34 
diff
changeset
 | 
91  | 
}  | 
| 
 
7732a7112b93
sample: start conversion to a kotlin multiplatform project
 
Da Risk <da_risk@geekorum.com> 
parents: 
34 
diff
changeset
 | 
92  | 
}  | 
| 
 
7732a7112b93
sample: start conversion to a kotlin multiplatform project
 
Da Risk <da_risk@geekorum.com> 
parents: 
34 
diff
changeset
 | 
93  | 
|
| 15 | 94  | 
android {
 | 
95  | 
namespace = "com.geekorum.aboutoss.sampleapp"  | 
|
| 
86
 
ed5dfac18c84
build: use convention plugins to simplify build scripts
 
Da Risk <da_risk@geekorum.com> 
parents: 
72 
diff
changeset
 | 
96  | 
compileSdk = 36  | 
| 15 | 97  | 
|
98  | 
    defaultConfig {
 | 
|
99  | 
applicationId = "com.geekorum.aboutoss.sampleapp"  | 
|
| 
86
 
ed5dfac18c84
build: use convention plugins to simplify build scripts
 
Da Risk <da_risk@geekorum.com> 
parents: 
72 
diff
changeset
 | 
100  | 
minSdk = 28  | 
| 
89
 
0cc872a9edbf
sample: make android sample edge to edge and target sdk 35
 
Da Risk <da_risk@geekorum.com> 
parents: 
86 
diff
changeset
 | 
101  | 
targetSdk = 35  | 
| 15 | 102  | 
versionCode = 1  | 
103  | 
versionName = "1.0"  | 
|
104  | 
||
105  | 
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"  | 
|
106  | 
        vectorDrawables {
 | 
|
107  | 
useSupportLibrary = true  | 
|
108  | 
}  | 
|
109  | 
}  | 
|
110  | 
||
111  | 
    buildTypes {
 | 
|
112  | 
        release {
 | 
|
113  | 
isMinifyEnabled = false  | 
|
114  | 
proguardFiles(  | 
|
115  | 
                getDefaultProguardFile("proguard-android-optimize.txt"),
 | 
|
116  | 
"proguard-rules.pro"  | 
|
117  | 
)  | 
|
118  | 
}  | 
|
119  | 
}  | 
|
120  | 
    compileOptions {
 | 
|
| 
44
 
7732a7112b93
sample: start conversion to a kotlin multiplatform project
 
Da Risk <da_risk@geekorum.com> 
parents: 
34 
diff
changeset
 | 
121  | 
sourceCompatibility = JavaVersion.VERSION_17  | 
| 
 
7732a7112b93
sample: start conversion to a kotlin multiplatform project
 
Da Risk <da_risk@geekorum.com> 
parents: 
34 
diff
changeset
 | 
122  | 
targetCompatibility = JavaVersion.VERSION_17  | 
| 15 | 123  | 
}  | 
| 
44
 
7732a7112b93
sample: start conversion to a kotlin multiplatform project
 
Da Risk <da_risk@geekorum.com> 
parents: 
34 
diff
changeset
 | 
124  | 
|
| 15 | 125  | 
    buildFeatures {
 | 
126  | 
compose = true  | 
|
| 
18
 
ac393491d2eb
sample: complete sample application
 
Da Risk <da_risk@geekorum.com> 
parents: 
15 
diff
changeset
 | 
127  | 
buildConfig = true  | 
| 15 | 128  | 
}  | 
129  | 
    packaging {
 | 
|
130  | 
        resources {
 | 
|
131  | 
            excludes += "/META-INF/{AL2.0,LGPL2.1}"
 | 
|
132  | 
}  | 
|
133  | 
}  | 
|
134  | 
}  | 
|
135  | 
||
136  | 
dependencies {
 | 
|
137  | 
testImplementation(libs.junit)  | 
|
138  | 
androidTestImplementation(libs.androidx.test.ext.junit)  | 
|
139  | 
androidTestImplementation(libs.espresso.core)  | 
|
140  | 
androidTestImplementation(platform(libs.androidx.compose.bom))  | 
|
| 
72
 
746669e015f9
build: cleanup libs.versions.toml
 
Da Risk <da_risk@geekorum.com> 
parents: 
66 
diff
changeset
 | 
141  | 
androidTestImplementation(libs.androidx.compose.uiTestJunit4)  | 
| 
 
746669e015f9
build: cleanup libs.versions.toml
 
Da Risk <da_risk@geekorum.com> 
parents: 
66 
diff
changeset
 | 
142  | 
debugImplementation(libs.androidx.compose.uiTooling)  | 
| 
 
746669e015f9
build: cleanup libs.versions.toml
 
Da Risk <da_risk@geekorum.com> 
parents: 
66 
diff
changeset
 | 
143  | 
debugImplementation(libs.androidx.compose.uiTestManifest)  | 
| 102 | 144  | 
}  |