-
Notifications
You must be signed in to change notification settings - Fork 503
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: initial implementation of gradle plugin #73 #1005
Changes from 7 commits
f136a0f
26b4555
9d1b0b1
b4a0bfc
8954fa9
a24a07f
a861a10
61ede86
bcb06ba
5dbb578
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
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包。 | ||
Comment on lines
+10
to
+11
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Codebase verification Based on the gathered information, I can now provide a comprehensive response about the build instructions. Enhance the build instructions with more details and configuration options. The current documentation should be expanded to include:
arkConfig {
arkVersion = "2.2.14"
bizName = "example-biz"
excludes = ["group:artifact"]
} 🔗 Analysis chainEnhance the build instructions with more details. The build instructions should include:
Let's check the actual implementation to ensure documentation accuracy: Let me try a different approach to find the Gradle task and configuration details. Let me check the README files to understand the documented behavior and configuration options. Let me try one final search to find the configuration options and task details. Let me check the ArkJar task implementation and configuration options. 🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Look for the arkJar task implementation
ast-grep --pattern 'class $_ implements Task {
$$$
arkJar($$$) {
$$$
}
$$$
}'
Length of output: 47 Script: #!/bin/bash
# Search for arkJar task definition in Gradle files
rg -l "task.*arkJar" --type groovy --type gradle
# Search for configuration and task details
rg "arkJar|outputDirectory|ark" --type groovy --type gradle -A 5
# Look for any documentation about the task
fd "README" -e md -x rg -l "arkJar|ark.*plugin"
Length of output: 875 Script: #!/bin/bash
# Check content of relevant README files
echo "=== Main README ==="
cat README.md | rg -A 5 "arkJar|gradle.*plugin"
echo -e "\n=== Gradle Plugin README ==="
cat sofa-ark-parent/support/ark-gradle-plugin/README.md | rg -A 10 "arkJar|gradle.*plugin|配置项"
# Look for any test files that might document the behavior
rg -l "arkJar" --type-add 'test:*{Test,Spec}.*' --type test
Length of output: 677 Script: #!/bin/bash
# Search for arkConfig configuration options in source files
rg "arkConfig" --type groovy --type java -B 2 -A 5
# Look for any source files that define the task
fd -e java -e groovy --exec rg -l "class.*ArkJar|task.*arkJar"
# Check for any examples in test resources
fd -e gradle -t f -x rg -l "arkConfig"
Length of output: 8871 Script: #!/bin/bash
# Check the ArkJar task implementation
cat sofa-ark-parent/support/ark-gradle-plugin/src/main/java/com/alipay/sofa/ark/plugin/ArkJar.java
# Check the extension class for configuration options
rg -A 10 "class SofaArkGradlePluginExtension" --type java
# Look for any example configurations in test resources
fd -t f -e gradle -x rg -A 5 "arkConfig \{"
Length of output: 9987 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
plugins { | ||
id 'java' | ||
id 'java-gradle-plugin' | ||
} | ||
|
||
group = 'com.alipay.sofa' | ||
version = '1.0.0' | ||
|
||
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() | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
rootProject.name = 'ark-gradle-plugin' | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Enhance the configuration section with detailed examples.
The configuration section is too brief. Consider adding:
arkConfig
Would you like me to help create a comprehensive configuration documentation section?