-
Notifications
You must be signed in to change notification settings - Fork 28
/
build.gradle
86 lines (77 loc) · 2.66 KB
/
build.gradle
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
buildscript {
repositories {
mavenCentral()
maven { url 'https://maven.aliyun.com/repository/gradle-plugin' }
maven { url 'https://maven.aliyun.com/repository/public' }
maven { url 'https://jitpack.io' }
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.21"
}
}
plugins {
id 'org.jetbrains.kotlin.jvm' version '1.6.21'
id 'maven-publish'
}
allprojects {
group 'com.github.only52607.lua-mirai'
version '2.7.2'
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
kotlinOptions {
freeCompilerArgs = ['-Xjvm-default=enable', '-Xopt-in=kotlin.RequiresOptIn', '-Xcontext-receivers']
jvmTarget = "1.8"
}
}
repositories {
mavenLocal()
maven { url 'https://jitpack.io' }
maven { url 'https://maven.aliyun.com/repository/public' }
maven { url 'https://maven.aliyun.com/repository/google' }
mavenCentral()
}
}
subprojects {
apply plugin: 'java'
apply plugin: 'org.jetbrains.kotlin.jvm'
dependencies {
def mirai_core_version = "2.11.0"
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
implementation "net.mamoe:mirai-core-api:$mirai_core_version"
runtimeOnly "net.mamoe:mirai-core:$mirai_core_version"
testImplementation group: 'junit', name: 'junit', version: '4.12'
}
task sourcesJar(type: Jar) {
from sourceSets.main.allJava
archiveClassifier.set('sources')
}
task javadocJar(type: Jar) {
from javadoc
archiveClassifier.set('javadoc')
}
}
publishing {
publications {
luaMiraiCore(MavenPublication) {
setArtifactId("core")
def coreProject = project(':lua-mirai-core')
from coreProject.components.java
artifact coreProject.tasks.sourcesJar
artifact coreProject.tasks.javadocJar
}
luaktAdapter(MavenPublication) {
setArtifactId("adapter-lua")
def luaktAdapterProject = project(':lua-mirai-adapter-luakt')
from luaktAdapterProject.components.java
artifact luaktAdapterProject.tasks.sourcesJar
artifact luaktAdapterProject.tasks.javadocJar
}
configuration(MavenPublication) {
setArtifactId("configuration")
def luaktAdapterProject = project(':lua-mirai-configuration')
from luaktAdapterProject.components.java
artifact luaktAdapterProject.tasks.sourcesJar
artifact luaktAdapterProject.tasks.javadocJar
}
}
}