-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
64 lines (55 loc) · 1.77 KB
/
build.gradle.kts
File metadata and controls
64 lines (55 loc) · 1.77 KB
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
plugins {
id("com.android.library")
`maven-publish`
}
group = "com.goodanser.clj-android"
version = "0.1.0-SNAPSHOT"
android {
namespace = "com.goodanser.clj_android.runtime.core"
compileSdk = 35
defaultConfig {
minSdk = 26
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
publishing {
singleVariant("release") {
withSourcesJar()
}
}
}
dependencies {
compileOnly("org.clojure:clojure:1.12.0")
}
// When consumed via includeBuild(), raw project configurations are exposed
// instead of published module metadata. AGP's published metadata includes
// these attributes automatically, but the raw configurations do not, so we
// add them here for composite-build compatibility.
afterEvaluate {
val categoryAttr = Attribute.of("org.gradle.category", Named::class.java)
val jvmEnvAttr = Attribute.of("org.gradle.jvm.environment", Named::class.java)
val kotlinPlatformAttr = Attribute.of("org.jetbrains.kotlin.platform.type", Named::class.java)
configurations.configureEach {
if (isCanBeConsumed && !isCanBeResolved && name != "archives") {
attributes {
attribute(categoryAttr, objects.named("library"))
attribute(jvmEnvAttr, objects.named("android"))
attribute(kotlinPlatformAttr, objects.named("androidJvm"))
}
}
}
}
publishing {
publications {
register<MavenPublication>("release") {
afterEvaluate {
from(components["release"])
}
groupId = "com.goodanser.clj-android"
artifactId = "runtime-core"
version = project.version.toString()
}
}
}