Skip to content

Commit

Permalink
Merge branch 'master' into feat-file-es
Browse files Browse the repository at this point in the history
  • Loading branch information
wtt40122 committed Aug 14, 2024
2 parents 1f2dae8 + 7462e38 commit 82ea6e4
Show file tree
Hide file tree
Showing 579 changed files with 39,471 additions and 8,510 deletions.
59 changes: 57 additions & 2 deletions athena-all/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,31 @@
+ jdk version:jdk17
## startup config
+ build.gradle.kts
+ 添加Maven repository
+ ResourceUtils
+ ULTRAMAN_URL_PREFIX
+ 修改域名为真实域名
+ Const.BOT_URL
+ 修改域名为真实域名
+ Const.CONF_DASH_URL
+ 修改IP为真实IP
+ Const.CONF_AI_PROXY_URL
+ 修改IP为真实IP
+ Const.CONF_M78_URL
+ 修改域名为真实域名
+ UltramanWindowFactory
+ 修改nginxChatUrl为真实url
+ WsClient
+ 修改ws url为真实url
+ GuideService
+ HttpClient.post修改为真实url
+ BotService
+ 修改BOT_URL为真实的BOT调用的url
+ OpenImageConsumer
+ imgUrl修改
+ plugin.xml
+ vendor里的url改为真实url

## change log
+ 2023年12月25日
+ 1.代码注释 comment_side_car
+ 2.代码建议 code_suggest_sidecar
Expand All @@ -8,14 +35,42 @@
+ 3.屏蔽一些功能+部署到外网
+ 4.单元测试
+ 5.查找bug
+ 6.单元测试 test_code
+ 2023年12月26日
+ 搭一个外网版本
+ 2023年12月27日
+ 简化ide中生成代码的流程
+ 2024年01月01日
+ 尽量不再使用静态方法,而是使用ioc和aop
+ 2024年01月29日
+ 优化了单元测试代码
+ 优化了引入po

+ 最后的版本这是效能组所有中间件+效能工具+平台的决策大脑(给用户测的)
+ 方法重命名 rename_method
+ 函数参数重命名 rename_method_param_name
+ translation 选中翻译
+ suggest_sidecar 方法review(建议)
+ suggest_sidecar 方法review(建议)
+ 2024年02月19日
+ 方法补全:biz_completion
+ 生成代码:biz_sidecar
+ 都统一叫生成代码
+ 添加的代码注释支持多语言切换
+ prompt支持了函数能力
+ 代码补全也能自动分析代码作用范围(开启代码分析)
+ 2024年02月21日
+ 优化调试模式 (用来测试的prompt:24414:test_prompt)
+ 2024年03月02日(以后很长时间内都不在做新功能了,只优化现有的4个功能 生成代码 补全代码 智能命名 单元测试)
+ 解决了生成单元测试的一个bug(service里的代码在server创建测试方法的时候,不能列出老的方法)
+ 如果生成局部代码的时候,所处的位置是一个注释行,则在下一行开始生成代码
+ 给参数重命名
+ 2024年04月22日
+ 支持生成完整的测试类 test_class_code
+ 2024年06月02日
+ 所有prompt替换为bot(以后bot是第一元素)
+ 代码通过Inlay生成(100294)
+ 方法名重命名(rename_method->)
+ 添加注释(comment_2->)
+ 单元测试(test_code->)
+ 生成代码(biz_sidecar->)
+ 问题修复(bug_fix->)
145 changes: 139 additions & 6 deletions athena-all/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,15 +1,26 @@
import java.util.*

plugins {
id("java")
id("org.jetbrains.kotlin.jvm") version "1.7.20"
id("org.jetbrains.intellij") version "1.14.0"
}

group = "run.mone"
version = "2024.01.16.1"

// Load properties from src/main/resources/athena.properties
val athenaProperties = Properties().apply {
file("src/main/resources/athena.properties").inputStream().use { load(it) }
}
// Access the property
val pluginVersion = athenaProperties.getProperty("pluginVersion")

version = pluginVersion


repositories {
mavenLocal()
maven(uri("https://maven.aliyun.com/repository/public/"))
mavenCentral()
}

Expand All @@ -19,7 +30,7 @@ repositories {
intellij {
version.set("2023.1.2")
type.set("IC") // Target IDE Platform
plugins.set(listOf("com.intellij.java"/* Plugin Dependencies */))
plugins.set(listOf("com.intellij.java","JUnit","org.jetbrains.plugins.terminal"/* Plugin Dependencies */))
}

tasks {
Expand Down Expand Up @@ -53,26 +64,148 @@ tasks {
}

dependencies {

implementation("org.slf4j:slf4j-api:2.0.13")

implementation(fileTree(mapOf("dir" to "libs", "include" to listOf("*.jar"))))
implementation("com.ibeetl:beetl:3.15.4.RELEASE")

implementation("org.antlr:antlr4-runtime:4.7.2")
implementation("io.netty:netty-all:4.1.36.Final")
implementation("com.google.code.gson:gson:2.8.9")
implementation("run.mone:openai:1.4-SNAPSHOT")
implementation("com.google.guava:guava:32.0.1-jre")
implementation("com.squareup.okhttp3:okhttp:4.11.0")
implementation("com.squareup.okhttp3:okhttp-sse:4.11.0")
implementation("com.squareup.okhttp3:okhttp:4.10.0")
implementation("com.squareup.okhttp3:okhttp-sse:4.10.0")
implementation("org.apache.commons:commons-lang3:3.13.0")
implementation("com.github.javaparser:javaparser-core:3.25.6")

implementation("org.nutz:nutz:1.r.69.20210929")
implementation("mysql:mysql-connector-java:8.0.28")
implementation("org.apache.commons:commons-lang3:3.14.0")

implementation("run.mone:codegen:1.5-SNAPSHOT")
compileOnly("org.projectlombok:lombok:1.18.26")
annotationProcessor("org.projectlombok:lombok:1.18.26")

testCompileOnly("org.projectlombok:lombok:1.18.26")
testAnnotationProcessor("org.projectlombok:lombok:1.18.26")

}
}

buildscript {
repositories {
mavenLocal()
maven(uri("https://maven.aliyun.com/repository/public/"))
mavenCentral()
}
dependencies {
classpath("com.guardsquare:proguard-gradle:7.5.0")
}
}

tasks.register<proguard.gradle.ProGuardTask>("proguard") {
verbose()
// keepdirectories()// By default, directory entries are removed.
ignorewarnings()
target("17")

// Alternatively put your config in a separate file
// configuration("config.pro")

// Use the jar task output as a input jar. This will automatically add the necessary task dependency.
injars(tasks.named("instrumentedJar"))
// injars("build/libs/*.jar")

// outjars("build/${rootProject.name}-obfuscated.jar")
// injars("Athena-2024.06.03.2.jar")
outjars("build/instrumented-${rootProject.name}-obfuscated.jar")
val javaHome = System.getProperty("java.home")
// Automatically handle the Java version of this build, don't support JBR
// As of Java 9, the runtime classes are packaged in modular jmod files.
// libraryjars(
// // filters must be specified first, as a map
// mapOf("jarfilter" to "!**.jar",
// "filter" to "!module-info.class"),
// "$javaHome/jmods/java.base.jmod"
// )

// Add all JDK deps
// if( ! properties("skipProguard").toBoolean()) {
File("$javaHome/jmods/").listFiles()!!.forEach { libraryjars(it.absolutePath) }
// }

// libraryjars(configurations.runtimeClasspath.get().files)
// val ideaPath = getIDEAPath()

// Add all java plugins to classpath
// File("$ideaPath/plugins/java/lib").listFiles()!!.forEach { libraryjars(it.absolutePath) }
// Add all IDEA libs to classpath
// File("$ideaPath/lib").listFiles()!!.forEach { libraryjars(it.absolutePath) }

libraryjars(configurations.compileClasspath.get())

dontshrink()
dontoptimize()
//useuniqueclassmembernames()

// allowaccessmodification() //you probably shouldn't use this option when processing code that is to be used as a library, since classes and class members that weren't designed to be public in the API may become public

adaptclassstrings("**.xml")
adaptresourcefilecontents("**.xml")// or adaptresourcefilecontents()

// Allow methods with the same signature, except for the return type,
// to get the same obfuscation name.
//overloadaggressively()
// Put all obfuscated classes into the nameless root package.
// repackageclasses("")

printmapping("build/proguard-mapping.txt")

adaptresourcefilenames()
optimizationpasses(9)
allowaccessmodification()
// mergeinterfacesaggressively()
renamesourcefileattribute("SourceDir")
keepattributes("Exceptions,InnerClasses,Signature,Deprecated,SourceFile,LineNumberTable,*Annotation*,EnclosingMethod")

obfuscationdictionary("dic.txt")

// 保留除指定包路径外的所有类不被混淆
keep("""
class !com.xiaomi.youpin.tesla.ip.common.**,
!com.xiaomi.youpin.tesla.ip.service.**,
!run.mone.ultraman.common.**,
!run.mone.ultraman.service.** {
*;
}
""".trimIndent())

// 允许特定包路径下的类被混淆
// keep("""
// class com.xiaomi.youpin.tesla.ip.common.** { *; }
// class com.xiaomi.youpin.tesla.ip.service.** { *; }
// class run.mone.ultraman.common.** { *; }
// """.trimIndent())

}


//tasks {
// prepareSandbox {
// dependsOn("proguard")
// doFirst {
// println("${rootProject.name}-${rootProject.version}")
// val original = File("build/libs/instrumented-${rootProject.name}-${rootProject.version}.jar")
// println(original.absolutePath)
// val obfuscated = File("build/instrumented-${rootProject.name}-obfuscated.jar")
// println(obfuscated.absolutePath)
// if (original.exists() && obfuscated.exists()) {
// original.delete()
// obfuscated.renameTo(original)
// println("info: plugin file obfuscated")
// } else {
// println("error: some file does not exist, plugin file not obfuscated")
// }
// }
// }
//}
Loading

0 comments on commit 82ea6e4

Please sign in to comment.