From 767b243d0f975ed966485b8a8bdc38b7f9356423 Mon Sep 17 00:00:00 2001 From: huangx <549631030@qq.com> Date: Fri, 9 Jun 2023 08:53:32 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3java8=E7=94=9F=E6=88=90?= =?UTF-8?q?=E5=A4=B1=E8=B4=A5=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.gradle | 2 +- library/gradle.properties | 2 +- .../cn/hx/plugin/junkcode/task/AndroidJunkCodeTask.groovy | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/build.gradle b/build.gradle index a4207b18..0de520d3 100644 --- a/build.gradle +++ b/build.gradle @@ -11,7 +11,7 @@ buildscript { classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath "com.getkeepsafe.dexcount:dexcount-gradle-plugin:3.0.1" if (PLUGIN_ENABLE.toBoolean()) { - classpath "com.github.qq549631030:android-junk-code:1.2.3" + classpath "com.github.qq549631030:android-junk-code:1.2.4" } // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files diff --git a/library/gradle.properties b/library/gradle.properties index 3393db22..d6cb7b31 100644 --- a/library/gradle.properties +++ b/library/gradle.properties @@ -1,6 +1,6 @@ #project GROUP=com.github.qq549631030 -VERSION_NAME=1.2.3 +VERSION_NAME=1.2.4 POM_ARTIFACT_ID=android-junk-code POM_NAME=AndroidJunkCode diff --git a/library/src/main/groovy/cn/hx/plugin/junkcode/task/AndroidJunkCodeTask.groovy b/library/src/main/groovy/cn/hx/plugin/junkcode/task/AndroidJunkCodeTask.groovy index d0de7f0a..e2ad311f 100644 --- a/library/src/main/groovy/cn/hx/plugin/junkcode/task/AndroidJunkCodeTask.groovy +++ b/library/src/main/groovy/cn/hx/plugin/junkcode/task/AndroidJunkCodeTask.groovy @@ -13,7 +13,6 @@ import org.gradle.api.tasks.OutputDirectory import org.gradle.api.tasks.TaskAction import javax.lang.model.element.Modifier -import java.nio.charset.Charset import java.nio.file.Files import java.nio.file.Path @@ -262,7 +261,7 @@ class AndroidJunkCodeTask extends DefaultTask { } FileWriter writer try { - writer = new FileWriter(file, Charset.forName("UTF-8")) + writer = new FileWriter(file) writer.write(data) } catch (Exception e) { e.printStackTrace()