-
Notifications
You must be signed in to change notification settings - Fork 56
/
build.gradle.kts
148 lines (119 loc) · 5.09 KB
/
build.gradle.kts
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
import org.jetbrains.compose.compose
import org.jetbrains.compose.desktop.application.dsl.TargetFormat
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
val kotlinVersion = "1.9.0"
kotlin("jvm") version kotlinVersion
kotlin("kapt") version kotlinVersion
id("org.jetbrains.compose") version "1.5.0-beta01"
}
val daggerVersion by extra("2.47")
val stackzyVersion by extra("1.2.6") // TODO : Change in App.kt also
group = "com.theapache64"
version = stackzyVersion
repositories {
// mavenLocal()
mavenCentral()
google()
maven { url = uri("https://maven.pkg.jetbrains.space/public/p/compose/dev") }
maven { url = uri("https://jitpack.io") }
}
dependencies {
implementation(kotlin("stdlib-jdk8"))
testImplementation(kotlin("test-junit"))
implementation(compose.desktop.currentOs)
implementation(compose.materialIconsExtended)
// Module dependencies
implementation(project(":data"))
// Cyclone
implementation("com.github.theapache64:cyclone:1.0.0-alpha02")
// Dagger : A fast dependency injector for Android and Java.
kapt("com.google.dagger:dagger-compiler:$daggerVersion")
kaptTest("com.google.dagger:dagger-compiler:$daggerVersion")
// Decompose : Decompose
val decomposeVersion = "0.5.0" // FIXME : bump to latest
implementation("com.arkivanov.decompose:decompose-jvm:$decomposeVersion")
implementation("com.arkivanov.decompose:extensions-compose-jetbrains-jvm:$decomposeVersion")
// Color naming (dev purpose only)
implementation("com.github.theapache64:name-that-color:1.0.0-alpha02")
// Kamel : Image loading library
implementation("com.alialbaali.kamel:kamel-image:0.3.0")
val bouncyCastleVersion = "1.69"
implementation("org.bouncycastle:bcprov-jdk15on:$bouncyCastleVersion")
// Bugsnag
implementation("com.bugsnag:bugsnag:3.7.0")
/**
* Testing Dependencies
*/
testImplementation("org.mockito:mockito-inline:4.2.0")
testImplementation("com.nhaarman.mockitokotlin2:mockito-kotlin:2.2.0")
// DaggerMock
testImplementation("com.github.fabioCollini.daggermock:daggermock:0.8.5")
testImplementation("com.github.fabioCollini.daggermock:daggermock-kotlin:0.8.5")
// Mockito Core : Mockito mock objects library core API and implementation
testImplementation("org.mockito:mockito-core:4.2.0")
// Expekt : An assertion library for Kotlin
testImplementation("com.github.theapache64:expekt:1.0.0")
// JUnit
testImplementation("org.junit.jupiter:junit-jupiter:5.8.2")
}
tasks.test {
useJUnit()
// useJUnitPlatform()
environment("ANDROID_HOME", System.getenv("ANDROID_HOME") ?: "/home/theapache64/Android/Sdk")
}
tasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = "15"
// kotlinOptions.freeCompilerArgs += "-Xuse-experimental=androidx.compose.foundation.ExperimentalFoundationApi"
// kotlinOptions.freeCompilerArgs += "-Xuse-experimental=androidx.compose.ui.ExperimentalComposeUiApi"
// kotlinOptions.freeCompilerArgs += "-Xuse-experimental=kotlin.io.path.ExperimentalPathApi"
}
tasks.withType<org.gradle.jvm.tasks.Jar> {
exclude("META-INF/BC1024KE.RSA", "META-INF/BC1024KE.SF", "META-INF/BC1024KE.DSA")
exclude("META-INF/BC2048KE.RSA", "META-INF/BC2048KE.SF", "META-INF/BC2048KE.DSA")
}
tasks.jar {
exclude("META-INF/BC1024KE.RSA", "META-INF/BC1024KE.SF", "META-INF/BC1024KE.DSA")
exclude("META-INF/BC2048KE.RSA", "META-INF/BC2048KE.SF", "META-INF/BC2048KE.DSA")
}
compose.desktop {
application {
mainClass = "com.theapache64.stackzy.AppKt"
nativeDistributions {
packageName = "Stackzy"
packageVersion = project.version as String
description = "An application to identify libraries used inside an android application"
copyright = "© 2021 theapache64. All rights reserved."
vendor = "theapache64"
appResourcesRootDir.set(project.layout.projectDirectory.dir("resources"))
modules(
"java.logging",
"java.naming",
"jdk.crypto.ec"
)
targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb)
val iconsRoot = project.file("src/main/resources/drawables")
linux {
iconFile.set(iconsRoot.resolve("launcher_icons/linux.png"))
}
windows {
iconFile.set(iconsRoot.resolve("launcher_icons/windows.ico"))
// Wondering what the heck is this? See : https://wixtoolset.org/documentation/manual/v3/howtos/general/generate_guids.html
upgradeUuid = "31575EDF-D0D5-4CEF-A4D2-7562083D6D88"
menuGroup = packageName
perUserInstall = true
}
macOS {
iconFile.set(iconsRoot.resolve("launcher_icons/macos.icns"))
}
}
}
}
val compileKotlin: KotlinCompile by tasks
compileKotlin.kotlinOptions {
jvmTarget = JavaVersion.VERSION_17.toString()
}
val compileTestKotlin: KotlinCompile by tasks
compileTestKotlin.kotlinOptions {
jvmTarget = JavaVersion.VERSION_17.toString()
}