generated from Aliucord/plugins-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
92 lines (76 loc) · 2.95 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
import com.aliucord.gradle.AliucordExtension
import com.android.build.gradle.BaseExtension
buildscript {
repositories {
google()
mavenCentral()
// Aliucords Maven repo which contains our tools and dependencies
maven("https://maven.aliucord.com/snapshots")
// Shitpack which still contains some Aliucord dependencies for now. TODO: Remove
maven("https://jitpack.io")
}
dependencies {
classpath("com.android.tools.build:gradle:7.0.4")
// Aliucord gradle plugin which makes everything work and builds plugins
classpath("com.aliucord:gradle:main-SNAPSHOT")
// Kotlin support. Remove if you want to use Java
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.21")
}
}
allprojects {
repositories {
google()
mavenCentral()
maven("https://maven.aliucord.com/snapshots")
}
}
fun Project.aliucord(configuration: AliucordExtension.() -> Unit) = extensions.getByName<AliucordExtension>("aliucord").configuration()
fun Project.android(configuration: BaseExtension.() -> Unit) = extensions.getByName<BaseExtension>("android").configuration()
subprojects {
apply(plugin = "com.android.library")
apply(plugin = "com.aliucord.gradle")
// Remove if using Java
apply(plugin = "kotlin-android")
// Fill out with your info
aliucord {
author("impqxr", 458605907245400064L)
updateUrl.set("https://raw.githubusercontent.com/Impqxr/ac-plugins/builds/updater.json")
buildUrl.set("https://raw.githubusercontent.com/Impqxr/ac-plugins/builds/%s.zip")
}
android {
compileSdkVersion(31)
defaultConfig {
minSdk = 24
targetSdk = 31
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions {
jvmTarget = "11" // Required
// Disables some unnecessary features
freeCompilerArgs = freeCompilerArgs +
"-Xno-call-assertions" +
"-Xno-param-assertions" +
"-Xno-receiver-assertions"
}
}
}
dependencies {
val discord by configurations
val implementation by configurations
// Stubs for all Discord classes
discord("com.discord:discord:aliucord-SNAPSHOT")
implementation("com.aliucord:Aliucord:main-SNAPSHOT")
implementation("androidx.appcompat:appcompat:1.4.0")
implementation("com.google.android.material:material:1.4.0")
implementation("androidx.constraintlayout:constraintlayout:2.1.2")
implementation("com.google.code.gson:gson:2.10.1")
// implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.3.0")
}
}
task<Delete>("clean") {
delete(rootProject.buildDir)
}