-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
133 lines (120 loc) · 4.79 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
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
plugins {
id 'java'
id 'maven-publish'
id 'org.graalvm.buildtools.native' version '0.9.27'
}
ext {
set("springVersion", "6.0.13")
//set("dubboVersion", "3.2.7")
set("kafkaVersion", "2.8.1")
}
allprojects {
group = 'com.cheeseocean.im'
version = '1.0.0'
repositories {
maven { url 'https://maven.aliyun.com/repository/public' }
maven { url 'https://maven.aliyun.com/repository/apache-snapshots' }
mavenLocal()
maven {
url = uri("https://maven.pkg.github.com/cheeseocean/CheesePackages")
credentials {
username = project.findProperty("gpr.user") ?: System.getenv("USERNAME")
password = project.findProperty("gpr.key") ?: System.getenv("TOKEN")
}
}
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
vendor = JvmVendorSpec.ORACLE
}
}
}
subprojects {
apply plugin: 'java'
apply plugin: 'maven-publish'
dependencies {
testImplementation platform('org.junit:junit-bom:5.9.1')
testImplementation 'org.junit.jupiter:junit-jupiter'
testCompileOnly 'org.projectlombok:lombok:1.18.26'
testAnnotationProcessor 'org.projectlombok:lombok:1.18.26'
implementation enforcedPlatform("org.springframework:spring-framework-bom:$springVersion")
//spring (based ioc aop)
//implementation "org.springframework:spring-context"
implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.12.5'
implementation 'ch.qos.logback:logback-core:1.4.9'
implementation 'ch.qos.logback:logback-classic:1.4.9'
implementation 'org.slf4j:log4j-over-slf4j:1.7.25'
implementation 'org.slf4j:jcl-over-slf4j:1.7.25'
implementation 'io.netty:netty-all:4.1.68.Final'
//dubbo rpc
//implementation "org.apache.dubbo:dubbo-config-spring:$dubboVersion"
//implementation "org.apache.dubbo:dubbo-rpc-dubbo:$dubboVersion"
//implementation "org.apache.dubbo:dubbo-remoting-netty4:$dubboVersion"
//implementation "org.apache.dubbo:dubbo-serialization-hessian2:$dubboVersion"
////nacos-registry
//implementation "org.apache.dubbo:dubbo-registry-nacos:$dubboVersion"
//implementation "org.apache.dubbo:dubbo-configcenter-nacos:$dubboVersion"
//implementation "org.apache.dubbo:dubbo-metadata-report-nacos:$dubboVersion"
////zookeeper-registry
//implementation "org.apache.dubbo:dubbo-registry-zookeeper:$dubboVersion"
//implementation "org.apache.dubbo:dubbo-configcenter-zookeeper:$dubboVersion"
//implementation "org.apache.dubbo:dubbo-metadata-report-zookeeper:$dubboVersion"
//lombok
compileOnly 'org.projectlombok:lombok:1.18.30'
annotationProcessor 'org.projectlombok:lombok:1.18.30'
}
tasks.register('apiJar', Jar) {
from(sourceSets.main.output) {
include 'com/cheeseocean/im/*/api/**'
}
}
tasks.register('apiSourceJar', Jar) {
from(sourceSets.main.allSource) {
include 'com/cheeseocean/im/*/api/**'
}
archiveClassifier = 'sources'
}
publishing {
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/cheeseocean/CheesePackages")
credentials {
username = project.findProperty("gpr.user") ?: System.getenv("USERNAME")
password = project.findProperty("gpr.key") ?: System.getenv("TOKEN")
}
}
}
publications {
gpr(MavenPublication) {
artifactId "${project.name}-api"
//using gradle module:publish -Dapi.version or edit in gradle.properties
version System.getProperty("api.version") ?: project.findProperty("${project.name}.api.version")
artifact apiJar
artifact apiSourceJar
pom {
name = "CheeseIM ${project.name} API Jar"
description = "CheeseIM API dependencies"
url = "http://github.com/cheeseocean/CheeseIM"
licenses {
license {
name = "The Apache License, Version 2.0"
url = "http://www.apache.org/licenses/LICENSE-2.0.txt"
}
}
developers {
developer {
id = "xxxcrel"
name = "xxxcrel"
email = "xxxcrel@gmail.com"
}
}
}
}
}
}
test {
useJUnitPlatform()
}
}