Skip to content

Commit

Permalink
feat: initial implementation of gradle plugin #73 (#1005)
Browse files Browse the repository at this point in the history
* feat: initial implementation of ark gradle plugin
  • Loading branch information
pmupkin authored Oct 30, 2024
1 parent 0a41e92 commit 30663b3
Show file tree
Hide file tree
Showing 18 changed files with 2,715 additions and 0 deletions.
11 changes: 11 additions & 0 deletions sofa-ark-parent/support/ark-gradle-plugin/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Ark Gradle打包插件使用
`sofa-ark-gradle-plugin`模块是Ark打包工具的Gradle版本实现,和Maven打包工具`sofa-ark-maven-plugin`有同样的功能,用于打包ark包和biz包。
# 配置
`sofa-ark-gradle-plugin` 使用 arkConfig 来进行配置。

# 如何使用
1. 本地发布引用
2. 远程仓库引入(待申请)

参考`sofa-ark-plugin-gradle-plugin`的本地发布和引入。
使用Gradle刷新后,如果一切正常,会在IDEA右侧Gradle任务列表中出现arkJar,具体如下: Tasks > build > arkJar,点击arkJar执行,会在指定的outputDirectory中输出ark包和biz包。
55 changes: 55 additions & 0 deletions sofa-ark-parent/support/ark-gradle-plugin/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
plugins {
id 'java'
id 'java-gradle-plugin'
id 'maven-publish'
}

ext {
arkGradlePluginId = 'sofa-ark-gradle-plugin'
}

group = 'com.alipay.sofa'
version = '1.0.0'
sourceCompatibility = '1.8'

publishing {
publications {
maven(MavenPublication) {
from components.java
groupId = project.group
artifactId = arkGradlePluginId
version = project.version
}
}

repositories {
maven {
mavenLocal()
}
}
}

gradlePlugin {
plugins {
DependenciesPlugin{
id = arkGradlePluginId
implementationClass = 'com.alipay.sofa.ark.plugin.SofaArkGradlePlugin'
}
}
}


repositories {
mavenLocal()
mavenCentral()
}

dependencies {
implementation 'org.ow2.asm:asm:9.4'
implementation 'org.apache.commons:commons-compress:1.26.1'
implementation 'com.alipay.sofa:sofa-ark-tools:2.2.12'
}

test {
useJUnitPlatform()
}
2 changes: 2 additions & 0 deletions sofa-ark-parent/support/ark-gradle-plugin/settings.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
rootProject.name = 'ark-gradle-plugin'

Loading

0 comments on commit 30663b3

Please sign in to comment.