mirror of
https://gitee.com/mybatis-flex/mybatis-flex.git
synced 2025-12-08 01:28:24 +08:00
fix: gradle 项目 apt 设置支持。
This commit is contained in:
parent
e6a2bb94f6
commit
54448afe40
@ -58,10 +58,15 @@ public class MybatisFlexConfig {
|
|||||||
|
|
||||||
File moduleRoot = new File(aptConfigFileObject.toUri()).getParentFile().getParentFile().getParentFile();
|
File moduleRoot = new File(aptConfigFileObject.toUri()).getParentFile().getParentFile().getParentFile();
|
||||||
|
|
||||||
// pom.xml -> Maven 项目
|
// pom.xml -> Maven 项目
|
||||||
// build.gradle -> Gradle 项目
|
// build.gradle -> Gradle 项目
|
||||||
if (new File(moduleRoot, "build.gradle").exists()) {
|
// build.gradle.kts -> Gradle 项目
|
||||||
|
if (new File(moduleRoot, "pom.xml").exists()) {
|
||||||
|
FileUtil.setBuildFile("pom.xml");
|
||||||
|
} else if (new File(moduleRoot, "build.gradle").exists()) {
|
||||||
FileUtil.setBuildFile("build.gradle");
|
FileUtil.setBuildFile("build.gradle");
|
||||||
|
} else if (new File(moduleRoot, "build.gradle.kts").exists()) {
|
||||||
|
FileUtil.setBuildFile("build.gradle.kts");
|
||||||
}
|
}
|
||||||
|
|
||||||
while (FileUtil.existsBuildFile(moduleRoot)) {
|
while (FileUtil.existsBuildFile(moduleRoot)) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user