-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
48 lines (36 loc) · 2.31 KB
/
Makefile
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
.SECONDARY:#保留中间过程文件
include build.common.mk
# 测试 Gradle 生命周期
lifecycle.tail=
lifecycle:
cd samples/lifecycle && ./gradlew lifecycle-module:test -Dlifecycle.test=true $(lifecycle.tail)
$(BUILD)/lifecycle.log: $(BUILD) # make build/lifecycle.log
make lifecycle lifecycle.tail='> ../../$@'
# 测试插件
manual-test-asciidoctor: peacetrue-gradle-plugin
cd manual-test && ./gradlew :manual-test-asciidoctor:openApiGenerate --debug | grep 'peacetrue-log:'
# 切换
switch.maven:
cd peacetrue-gradle-plugin && rm -rf build.gradle && ln build.mavenCentral.gradle build.gradle && ln src/test/resources/META-INF/gradle-plugins/io.github.peacetrue.build-convention.properties src/main/resources/META-INF/gradle-plugins/io.github.peacetrue.build-convention.properties
switch.gradle:
cd peacetrue-gradle-plugin && rm -rf build.gradle src/main/resources/META-INF/gradle-plugins/io.github.peacetrue.build-convention.properties && ln build.gradlePluginPortal.gradle build.gradle
projects=gradle dependencies test beans common cryptography spring validation servlet persistence result tplngn template openapitools
#projects=user
group: $(addprefix group.,$(projects));
group.%:
cd "$(workingDir)/peacetrue-$*" && sed -i 's/peaceGradleVersion=1.1.3/peaceGradleVersion=1.2.0/' gradle.properties
cd "$(workingDir)/peacetrue-$*" && sed -i 's/com.github.peacetrue.gradle/io.github.peacetrue.gradle/' *.gradle
# 发布到本地
publishToMavenLocal: $(addprefix publishToMavenLocal.,$(projects));
publishToMavenLocal.gradle:
./gradlew peacetrue-gradle-plugin:publishToMavenLocal
publishToMavenLocal.%:
cd "$(workingDir)/peacetrue-$*" && sed -i 's/peaceGradleVersion=1.1.3/peaceGradleVersion=1.2.0/' gradle.properties && ./gradlew publishToMavenLocal
publish: $(addprefix publish.,$(projects));
publish.gradle:; ./gradlew peacetrue-gradle-plugin:publish
publish.%:
cd "$(workingDir)/peacetrue-$*" && sed -i 's/peaceGradleVersion=1.1.3/peaceGradleVersion=1.2.0/' gradle.properties && ./gradlew publish
# 发布插件,需提前在本地配置秘钥 https://plugins.gradle.org/u/peacetrue,需要审核,非英文审核不过
publishPlugins:
./gradlew peacetrue-gradle-plugin:publishPlugins -Pgradle.publish.key=$(gradlePublishKey) -Pgradle.publish.secret=$(gradlePublishSecret)
#list-projects:; ls -ls $(workingDir) | grep peacetrue-