diff --git a/.gitignore b/.gitignore index 2fbf012..f7415cf 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,5 @@ *.iml .gradle -.maven /local.properties /.idea/caches /.idea/libraries @@ -13,4 +12,4 @@ /captures .externalNativeBuild .cxx -local.properties +local.properties \ No newline at end of file diff --git a/demo-app/src/main/java/com/highcapable/yukireflection/demo_app/test/Main.java b/demo-app/src/main/java/com/highcapable/yukireflection/demo_app/test/Main.java deleted file mode 100644 index 8aff653..0000000 --- a/demo-app/src/main/java/com/highcapable/yukireflection/demo_app/test/Main.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.highcapable.yukireflection.demo_app.test; - -@SuppressWarnings("FieldMayBeFinal") -public class Main { - - private static String staticContent = "I am static!"; - - private final String content; - - public Main(String content) { - this.content = content; - } - - public String getContent() { - return content; - } - - public static String getStaticContent() { - return staticContent; - } -} \ No newline at end of file diff --git a/img-src/wechat_code.jpg b/img-src/wechat_code.jpg deleted file mode 100644 index 15dbcde..0000000 Binary files a/img-src/wechat_code.jpg and /dev/null differ diff --git a/demo-app/.gitignore b/samples/.gitignore similarity index 100% rename from demo-app/.gitignore rename to samples/.gitignore diff --git a/yukireflection/.gitignore b/samples/demo-android/.gitignore similarity index 100% rename from yukireflection/.gitignore rename to samples/demo-android/.gitignore diff --git a/demo-app/proguard-rules.pro b/samples/demo-android/proguard-rules.pro similarity index 64% rename from demo-app/proguard-rules.pro rename to samples/demo-android/proguard-rules.pro index 481bb43..363e118 100644 --- a/demo-app/proguard-rules.pro +++ b/samples/demo-android/proguard-rules.pro @@ -18,4 +18,23 @@ # If you keep the line number information, uncomment this to # hide the original source file name. -#-renamesourcefileattribute SourceFile \ No newline at end of file +#-renamesourcefileattribute SourceFile + +-ignorewarnings + +-optimizationpasses 10 +-dontusemixedcaseclassnames + +-dontoptimize +-verbose +-overloadaggressively +-allowaccessmodification + +-adaptclassstrings +-adaptresourcefilenames +-adaptresourcefilecontents + +-renamesourcefileattribute P +-keepattributes SourceFile,LineNumberTable + +-keep class com.highcapable.yukireflection.demo_app.test.Main {*;} \ No newline at end of file diff --git a/demo-app/src/androidTest/java/com/highcapable/yukireflection/ExampleInstrumentedTest.kt b/samples/demo-android/src/androidTest/java/com/highcapable/yukireflection/ExampleInstrumentedTest.kt similarity index 100% rename from demo-app/src/androidTest/java/com/highcapable/yukireflection/ExampleInstrumentedTest.kt rename to samples/demo-android/src/androidTest/java/com/highcapable/yukireflection/ExampleInstrumentedTest.kt diff --git a/demo-app/src/main/AndroidManifest.xml b/samples/demo-android/src/main/AndroidManifest.xml similarity index 100% rename from demo-app/src/main/AndroidManifest.xml rename to samples/demo-android/src/main/AndroidManifest.xml diff --git a/demo-app/src/main/ic_launcher-playstore.png b/samples/demo-android/src/main/ic_launcher-playstore.png similarity index 100% rename from demo-app/src/main/ic_launcher-playstore.png rename to samples/demo-android/src/main/ic_launcher-playstore.png diff --git a/samples/demo-android/src/main/java/com/highcapable/yukireflection/demo_app/test/Main.java b/samples/demo-android/src/main/java/com/highcapable/yukireflection/demo_app/test/Main.java new file mode 100644 index 0000000..e609ffe --- /dev/null +++ b/samples/demo-android/src/main/java/com/highcapable/yukireflection/demo_app/test/Main.java @@ -0,0 +1,48 @@ +/* + * YukiReflection - An efficient Reflection API for Java and Android built in Kotlin + * Copyright (C) 2019-2023 HighCapable + * https://github.com/fankes/YukiReflection + * + * MIT License + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * This file is created by fankes on 2022/8/7. + */ +package com.highcapable.yukireflection.demo_app.test; + +@SuppressWarnings("FieldMayBeFinal") +public class Main { + + private static String staticContent = "I am static!"; + + private final String content; + + public Main(String content) { + this.content = content; + } + + public String getContent() { + return content; + } + + public static String getStaticContent() { + return staticContent; + } +} \ No newline at end of file diff --git a/demo-app/src/main/java/com/highcapable/yukireflection/demo_app/ui/MainActivity.kt b/samples/demo-android/src/main/java/com/highcapable/yukireflection/demo_app/ui/MainActivity.kt similarity index 88% rename from demo-app/src/main/java/com/highcapable/yukireflection/demo_app/ui/MainActivity.kt rename to samples/demo-android/src/main/java/com/highcapable/yukireflection/demo_app/ui/MainActivity.kt index 5098342..0a76481 100644 --- a/demo-app/src/main/java/com/highcapable/yukireflection/demo_app/ui/MainActivity.kt +++ b/samples/demo-android/src/main/java/com/highcapable/yukireflection/demo_app/ui/MainActivity.kt @@ -1,5 +1,5 @@ /* - * YukiReflection - An efficient Reflection API for the Android platform built in Kotlin. + * YukiReflection - An efficient Reflection API for Java and Android built in Kotlin * Copyright (C) 2019-2023 HighCapable * https://github.com/fankes/YukiReflection * @@ -34,7 +34,11 @@ import androidx.appcompat.app.AppCompatActivity import com.highcapable.yukireflection.YukiReflection import com.highcapable.yukireflection.demo_app.databinding.ActivityMainBinding import com.highcapable.yukireflection.demo_app.test.Main -import com.highcapable.yukireflection.factory.* +import com.highcapable.yukireflection.factory.buildOf +import com.highcapable.yukireflection.factory.classOf +import com.highcapable.yukireflection.factory.current +import com.highcapable.yukireflection.factory.field +import com.highcapable.yukireflection.factory.method import com.highcapable.yukireflection.type.java.StringClass class MainActivity : AppCompatActivity() { @@ -43,7 +47,7 @@ class MainActivity : AppCompatActivity() { super.onCreate(savedInstanceState) ActivityMainBinding.inflate(layoutInflater).apply { setContentView(root) - yukiReflectionVersionText.text = "YukiReflection Version:${YukiReflection.API_VERSION_NAME}(${YukiReflection.API_VERSION_CODE})" + yukiReflectionVersionText.text = "YukiReflection Version: ${YukiReflection.API_VERSION_NAME}(${YukiReflection.API_VERSION_CODE})" testObjectDirectlyButton.setOnClickListener { tipText.text = Main("I am directly call of new object").getContent() } diff --git a/demo-app/src/main/res/layout/activity_main.xml b/samples/demo-android/src/main/res/layout/activity_main.xml similarity index 100% rename from demo-app/src/main/res/layout/activity_main.xml rename to samples/demo-android/src/main/res/layout/activity_main.xml diff --git a/demo-app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/samples/demo-android/src/main/res/mipmap-anydpi-v26/ic_launcher.xml similarity index 100% rename from demo-app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml rename to samples/demo-android/src/main/res/mipmap-anydpi-v26/ic_launcher.xml diff --git a/demo-app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/samples/demo-android/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml similarity index 100% rename from demo-app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml rename to samples/demo-android/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml diff --git a/demo-app/src/main/res/mipmap-hdpi/ic_launcher.png b/samples/demo-android/src/main/res/mipmap-hdpi/ic_launcher.png similarity index 100% rename from demo-app/src/main/res/mipmap-hdpi/ic_launcher.png rename to samples/demo-android/src/main/res/mipmap-hdpi/ic_launcher.png diff --git a/demo-app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png b/samples/demo-android/src/main/res/mipmap-hdpi/ic_launcher_foreground.png similarity index 100% rename from demo-app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png rename to samples/demo-android/src/main/res/mipmap-hdpi/ic_launcher_foreground.png diff --git a/demo-app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/samples/demo-android/src/main/res/mipmap-hdpi/ic_launcher_round.png similarity index 100% rename from demo-app/src/main/res/mipmap-hdpi/ic_launcher_round.png rename to samples/demo-android/src/main/res/mipmap-hdpi/ic_launcher_round.png diff --git a/demo-app/src/main/res/mipmap-mdpi/ic_launcher.png b/samples/demo-android/src/main/res/mipmap-mdpi/ic_launcher.png similarity index 100% rename from demo-app/src/main/res/mipmap-mdpi/ic_launcher.png rename to samples/demo-android/src/main/res/mipmap-mdpi/ic_launcher.png diff --git a/demo-app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png b/samples/demo-android/src/main/res/mipmap-mdpi/ic_launcher_foreground.png similarity index 100% rename from demo-app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png rename to samples/demo-android/src/main/res/mipmap-mdpi/ic_launcher_foreground.png diff --git a/demo-app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/samples/demo-android/src/main/res/mipmap-mdpi/ic_launcher_round.png similarity index 100% rename from demo-app/src/main/res/mipmap-mdpi/ic_launcher_round.png rename to samples/demo-android/src/main/res/mipmap-mdpi/ic_launcher_round.png diff --git a/demo-app/src/main/res/mipmap-xhdpi/ic_launcher.png b/samples/demo-android/src/main/res/mipmap-xhdpi/ic_launcher.png similarity index 100% rename from demo-app/src/main/res/mipmap-xhdpi/ic_launcher.png rename to samples/demo-android/src/main/res/mipmap-xhdpi/ic_launcher.png diff --git a/demo-app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png b/samples/demo-android/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png similarity index 100% rename from demo-app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png rename to samples/demo-android/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png diff --git a/demo-app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/samples/demo-android/src/main/res/mipmap-xhdpi/ic_launcher_round.png similarity index 100% rename from demo-app/src/main/res/mipmap-xhdpi/ic_launcher_round.png rename to samples/demo-android/src/main/res/mipmap-xhdpi/ic_launcher_round.png diff --git a/demo-app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/samples/demo-android/src/main/res/mipmap-xxhdpi/ic_launcher.png similarity index 100% rename from demo-app/src/main/res/mipmap-xxhdpi/ic_launcher.png rename to samples/demo-android/src/main/res/mipmap-xxhdpi/ic_launcher.png diff --git a/demo-app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png b/samples/demo-android/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png similarity index 100% rename from demo-app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png rename to samples/demo-android/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png diff --git a/demo-app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/samples/demo-android/src/main/res/mipmap-xxhdpi/ic_launcher_round.png similarity index 100% rename from demo-app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png rename to samples/demo-android/src/main/res/mipmap-xxhdpi/ic_launcher_round.png diff --git a/demo-app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/samples/demo-android/src/main/res/mipmap-xxxhdpi/ic_launcher.png similarity index 100% rename from demo-app/src/main/res/mipmap-xxxhdpi/ic_launcher.png rename to samples/demo-android/src/main/res/mipmap-xxxhdpi/ic_launcher.png diff --git a/demo-app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png b/samples/demo-android/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png similarity index 100% rename from demo-app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png rename to samples/demo-android/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png diff --git a/demo-app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/samples/demo-android/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png similarity index 100% rename from demo-app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png rename to samples/demo-android/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png diff --git a/demo-app/src/main/res/values-night/themes.xml b/samples/demo-android/src/main/res/values-night/themes.xml similarity index 100% rename from demo-app/src/main/res/values-night/themes.xml rename to samples/demo-android/src/main/res/values-night/themes.xml diff --git a/demo-app/src/main/res/values/colors.xml b/samples/demo-android/src/main/res/values/colors.xml similarity index 100% rename from demo-app/src/main/res/values/colors.xml rename to samples/demo-android/src/main/res/values/colors.xml diff --git a/demo-app/src/main/res/values/ic_launcher_background.xml b/samples/demo-android/src/main/res/values/ic_launcher_background.xml similarity index 100% rename from demo-app/src/main/res/values/ic_launcher_background.xml rename to samples/demo-android/src/main/res/values/ic_launcher_background.xml diff --git a/demo-app/src/main/res/values/strings.xml b/samples/demo-android/src/main/res/values/strings.xml similarity index 100% rename from demo-app/src/main/res/values/strings.xml rename to samples/demo-android/src/main/res/values/strings.xml diff --git a/demo-app/src/main/res/values/themes.xml b/samples/demo-android/src/main/res/values/themes.xml similarity index 100% rename from demo-app/src/main/res/values/themes.xml rename to samples/demo-android/src/main/res/values/themes.xml diff --git a/demo-app/src/test/java/com/highcapable/yukireflection/ExampleUnitTest.kt b/samples/demo-android/src/test/java/com/highcapable/yukireflection/ExampleUnitTest.kt similarity index 100% rename from demo-app/src/test/java/com/highcapable/yukireflection/ExampleUnitTest.kt rename to samples/demo-android/src/test/java/com/highcapable/yukireflection/ExampleUnitTest.kt diff --git a/samples/demo-jvm/.gitignore b/samples/demo-jvm/.gitignore new file mode 100644 index 0000000..42afabf --- /dev/null +++ b/samples/demo-jvm/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/samples/demo-jvm/build.gradle.kts b/samples/demo-jvm/build.gradle.kts new file mode 100644 index 0000000..a2f7c00 --- /dev/null +++ b/samples/demo-jvm/build.gradle.kts @@ -0,0 +1,23 @@ +plugins { + autowire(libs.plugins.kotlin.jvm) + autowire(libs.plugins.kotlin.compose) +} + +group = property.project.samples.demo.jvm.groupName + +java { + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 +} + +compose.desktop { + application { + mainClass = "$group.MainKt" + } +} + +dependencies { + implementation(projects.yukireflectionCore) + implementation(compose.desktop.currentOs) + implementation(org.jetbrains.compose.material3.material3.desktop) +} \ No newline at end of file diff --git a/samples/demo-jvm/src/main/java/com/highcapable/yukireflection/demo_jvm/Main.kt b/samples/demo-jvm/src/main/java/com/highcapable/yukireflection/demo_jvm/Main.kt new file mode 100644 index 0000000..9b329d7 --- /dev/null +++ b/samples/demo-jvm/src/main/java/com/highcapable/yukireflection/demo_jvm/Main.kt @@ -0,0 +1,142 @@ +/* + * YukiReflection - An efficient Reflection API for Java and Android built in Kotlin + * Copyright (C) 2019-2023 HighCapable + * https://github.com/fankes/YukiReflection + * + * MIT License + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * This file is created by fankes on 2023/9/22. + */ +@file:Suppress("UsePropertyAccessSyntax") + +package com.highcapable.yukireflection.demo_jvm + +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.layout.padding +import androidx.compose.material3.Button +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.remember +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.draw.alpha +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.unit.dp +import androidx.compose.ui.unit.sp +import androidx.compose.ui.window.Window +import androidx.compose.ui.window.application +import androidx.compose.ui.window.rememberWindowState +import com.highcapable.yukireflection.YukiReflection +import com.highcapable.yukireflection.demo_jvm.test.Main +import com.highcapable.yukireflection.factory.buildOf +import com.highcapable.yukireflection.factory.classOf +import com.highcapable.yukireflection.factory.current +import com.highcapable.yukireflection.factory.field +import com.highcapable.yukireflection.factory.method +import com.highcapable.yukireflection.type.java.StringClass + +@Composable +fun MainLayout() { + val currentVersion = "YukiReflection Version: ${YukiReflection.API_VERSION_NAME}(${YukiReflection.API_VERSION_CODE})" + val operationState = remember { mutableStateOf("Waiting for your operation") } + Column( + modifier = Modifier.fillMaxSize(), + verticalArrangement = Arrangement.Center, + horizontalAlignment = Alignment.CenterHorizontally + ) { + Text( + text = "Using functions below to test", + fontSize = 18.sp, + modifier = Modifier.padding(bottom = 15.dp) + ) + Text( + text = operationState.value, + fontSize = 18.sp, + modifier = Modifier.padding(bottom = 35.dp) + ) + Button( + onClick = { operationState.value = Main("I am directly call of new object").getContent() }, + modifier = Modifier.padding(bottom = 15.dp) + ) { + Text(text = "Create an Object and Call Directly") + } + Button( + onClick = { + operationState.value = + classOf
().buildOf("I am reflection call of new object") { param(StringClass) } + ?.current() + ?.method { + name = "getContent" + emptyParam() + }?.string() ?: "" + }, + modifier = Modifier.padding(bottom = 15.dp) + ) { + Text(text = "Create an Object and Call Reflection") + } + Button( + onClick = { operationState.value = Main.getStaticContent() }, + modifier = Modifier.padding(bottom = 15.dp) + ) { + Text(text = "Get Static and Call Directly") + } + Button( + onClick = { + operationState.value = classOf
().method { + name = "getStaticContent" + modifiers { isStatic } + }.get().string() + }, + modifier = Modifier.padding(bottom = 15.dp) + ) { + Text(text = "Get Static and Call Reflection") + } + Button( + onClick = { + classOf
().field { + name = "staticContent" + modifiers { isStatic } + }.get().set("I am static! Modified by reflection") + operationState.value = "Field is modified success" + } + ) { + Text(text = "Modified Static Field Using Reflection") + } + Text( + text = currentVersion, + fontSize = 15.sp, + modifier = Modifier.padding(top = 35.dp).alpha(0.55f) + ) + } +} + +fun main() = application { + Window( + onCloseRequest = ::exitApplication, + title = "YukiReflection", + resizable = false, + state = rememberWindowState(width = 450.dp, height = 600.dp) + ) { MaterialTheme(colorScheme = MaterialTheme.colorScheme.copy(primary = Color(0xFF31A4FF.toInt()))) { MainLayout() } } +} \ No newline at end of file diff --git a/samples/demo-jvm/src/main/java/com/highcapable/yukireflection/demo_jvm/test/Main.java b/samples/demo-jvm/src/main/java/com/highcapable/yukireflection/demo_jvm/test/Main.java new file mode 100644 index 0000000..c6a22f7 --- /dev/null +++ b/samples/demo-jvm/src/main/java/com/highcapable/yukireflection/demo_jvm/test/Main.java @@ -0,0 +1,48 @@ +/* + * YukiReflection - An efficient Reflection API for Java and Android built in Kotlin + * Copyright (C) 2019-2023 HighCapable + * https://github.com/fankes/YukiReflection + * + * MIT License + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * This file is created by fankes on 2022/8/7. + */ +package com.highcapable.yukireflection.demo_jvm.test; + +@SuppressWarnings("FieldMayBeFinal") +public class Main { + + private static String staticContent = "I am static!"; + + private final String content; + + public Main(String content) { + this.content = content; + } + + public String getContent() { + return content; + } + + public static String getStaticContent() { + return staticContent; + } +} \ No newline at end of file diff --git a/yukireflection-core/.gitignore b/yukireflection-core/.gitignore new file mode 100644 index 0000000..42afabf --- /dev/null +++ b/yukireflection-core/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/yukireflection-core/libs/android-34.jar b/yukireflection-core/libs/android-34.jar new file mode 100644 index 0000000..923bafc Binary files /dev/null and b/yukireflection-core/libs/android-34.jar differ diff --git a/yukireflection/src/main/java/com/highcapable/yukireflection/YukiReflection.kt b/yukireflection-core/src/main/java/com/highcapable/yukireflection/YukiReflection.kt similarity index 89% rename from yukireflection/src/main/java/com/highcapable/yukireflection/YukiReflection.kt rename to yukireflection-core/src/main/java/com/highcapable/yukireflection/YukiReflection.kt index 88f7184..95868e6 100644 --- a/yukireflection/src/main/java/com/highcapable/yukireflection/YukiReflection.kt +++ b/yukireflection-core/src/main/java/com/highcapable/yukireflection/YukiReflection.kt @@ -1,5 +1,5 @@ /* - * YukiReflection - An efficient Reflection API for the Android platform built in Kotlin. + * YukiReflection - An efficient Reflection API for Java and Android built in Kotlin * Copyright (C) 2019-2023 HighCapable * https://github.com/fankes/YukiReflection * @@ -30,6 +30,7 @@ package com.highcapable.yukireflection import com.highcapable.yukireflection.YukiReflection.Configs +import com.highcapable.yukireflection.generated.YukiReflectionProperties import java.lang.reflect.Member /** @@ -39,11 +40,11 @@ import java.lang.reflect.Member */ object YukiReflection { - /** 获取当前 [YukiReflection] 的版本 */ - const val API_VERSION_NAME = BuildConfig.API_VERSION_NAME + /** 版本名称 */ + const val API_VERSION_NAME = YukiReflectionProperties.PROJECT_YUKIREFLECTION_CORE_VERSION - /** 获取当前 [YukiReflection] 的版本号 */ - const val API_VERSION_CODE = BuildConfig.API_VERSION_CODE + /** 版本号 */ + const val API_VERSION_CODE = 3 /** * 配置 [YukiReflection] diff --git a/yukireflection/src/main/java/com/highcapable/yukireflection/annotation/CauseProblemsApi.kt b/yukireflection-core/src/main/java/com/highcapable/yukireflection/annotation/CauseProblemsApi.kt similarity index 94% rename from yukireflection/src/main/java/com/highcapable/yukireflection/annotation/CauseProblemsApi.kt rename to yukireflection-core/src/main/java/com/highcapable/yukireflection/annotation/CauseProblemsApi.kt index 72afd61..f6c4bf9 100644 --- a/yukireflection/src/main/java/com/highcapable/yukireflection/annotation/CauseProblemsApi.kt +++ b/yukireflection-core/src/main/java/com/highcapable/yukireflection/annotation/CauseProblemsApi.kt @@ -1,5 +1,5 @@ /* - * YukiReflection - An efficient Reflection API for the Android platform built in Kotlin. + * YukiReflection - An efficient Reflection API for Java and Android built in Kotlin * Copyright (C) 2019-2023 HighCapable * https://github.com/fankes/YukiReflection * diff --git a/yukireflection/src/main/java/com/highcapable/yukireflection/annotation/YukiPrivateApi.kt b/yukireflection-core/src/main/java/com/highcapable/yukireflection/annotation/YukiPrivateApi.kt similarity index 93% rename from yukireflection/src/main/java/com/highcapable/yukireflection/annotation/YukiPrivateApi.kt rename to yukireflection-core/src/main/java/com/highcapable/yukireflection/annotation/YukiPrivateApi.kt index 036eb51..4973a9d 100644 --- a/yukireflection/src/main/java/com/highcapable/yukireflection/annotation/YukiPrivateApi.kt +++ b/yukireflection-core/src/main/java/com/highcapable/yukireflection/annotation/YukiPrivateApi.kt @@ -1,5 +1,5 @@ /* - * YukiReflection - An efficient Reflection API for the Android platform built in Kotlin. + * YukiReflection - An efficient Reflection API for Java and Android built in Kotlin * Copyright (C) 2019-2023 HighCapable * https://github.com/fankes/YukiReflection * diff --git a/yukireflection/src/main/java/com/highcapable/yukireflection/bean/CurrentClass.kt b/yukireflection-core/src/main/java/com/highcapable/yukireflection/bean/CurrentClass.kt similarity index 98% rename from yukireflection/src/main/java/com/highcapable/yukireflection/bean/CurrentClass.kt rename to yukireflection-core/src/main/java/com/highcapable/yukireflection/bean/CurrentClass.kt index 9fce64a..304cc5b 100644 --- a/yukireflection/src/main/java/com/highcapable/yukireflection/bean/CurrentClass.kt +++ b/yukireflection-core/src/main/java/com/highcapable/yukireflection/bean/CurrentClass.kt @@ -1,5 +1,5 @@ /* - * YukiReflection - An efficient Reflection API for the Android platform built in Kotlin. + * YukiReflection - An efficient Reflection API for Java and Android built in Kotlin * Copyright (C) 2019-2023 HighCapable * https://github.com/fankes/YukiReflection * diff --git a/yukireflection/src/main/java/com/highcapable/yukireflection/bean/GenericClass.kt b/yukireflection-core/src/main/java/com/highcapable/yukireflection/bean/GenericClass.kt similarity index 96% rename from yukireflection/src/main/java/com/highcapable/yukireflection/bean/GenericClass.kt rename to yukireflection-core/src/main/java/com/highcapable/yukireflection/bean/GenericClass.kt index 18ac066..31b0e90 100644 --- a/yukireflection/src/main/java/com/highcapable/yukireflection/bean/GenericClass.kt +++ b/yukireflection-core/src/main/java/com/highcapable/yukireflection/bean/GenericClass.kt @@ -1,5 +1,5 @@ /* - * YukiReflection - An efficient Reflection API for the Android platform built in Kotlin. + * YukiReflection - An efficient Reflection API for Java and Android built in Kotlin * Copyright (C) 2019-2023 HighCapable * https://github.com/fankes/YukiReflection * diff --git a/yukireflection/src/main/java/com/highcapable/yukireflection/bean/VariousClass.kt b/yukireflection-core/src/main/java/com/highcapable/yukireflection/bean/VariousClass.kt similarity index 97% rename from yukireflection/src/main/java/com/highcapable/yukireflection/bean/VariousClass.kt rename to yukireflection-core/src/main/java/com/highcapable/yukireflection/bean/VariousClass.kt index 9cb7f06..17513af 100644 --- a/yukireflection/src/main/java/com/highcapable/yukireflection/bean/VariousClass.kt +++ b/yukireflection-core/src/main/java/com/highcapable/yukireflection/bean/VariousClass.kt @@ -1,5 +1,5 @@ /* - * YukiReflection - An efficient Reflection API for the Android platform built in Kotlin. + * YukiReflection - An efficient Reflection API for Java and Android built in Kotlin * Copyright (C) 2019-2023 HighCapable * https://github.com/fankes/YukiReflection * diff --git a/yukireflection/src/main/java/com/highcapable/yukireflection/factory/ReflectionFactory.kt b/yukireflection-core/src/main/java/com/highcapable/yukireflection/factory/ReflectionFactory.kt similarity index 99% rename from yukireflection/src/main/java/com/highcapable/yukireflection/factory/ReflectionFactory.kt rename to yukireflection-core/src/main/java/com/highcapable/yukireflection/factory/ReflectionFactory.kt index 803aeb3..66f2b52 100644 --- a/yukireflection/src/main/java/com/highcapable/yukireflection/factory/ReflectionFactory.kt +++ b/yukireflection-core/src/main/java/com/highcapable/yukireflection/factory/ReflectionFactory.kt @@ -1,5 +1,5 @@ /* - * YukiReflection - An efficient Reflection API for the Android platform built in Kotlin. + * YukiReflection - An efficient Reflection API for Java and Android built in Kotlin * Copyright (C) 2019-2023 HighCapable * https://github.com/fankes/YukiReflection * diff --git a/yukireflection/src/main/java/com/highcapable/yukireflection/finder/base/BaseFinder.kt b/yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/base/BaseFinder.kt similarity index 98% rename from yukireflection/src/main/java/com/highcapable/yukireflection/finder/base/BaseFinder.kt rename to yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/base/BaseFinder.kt index 5779921..8bce2d5 100644 --- a/yukireflection/src/main/java/com/highcapable/yukireflection/finder/base/BaseFinder.kt +++ b/yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/base/BaseFinder.kt @@ -1,5 +1,5 @@ /* - * YukiReflection - An efficient Reflection API for the Android platform built in Kotlin. + * YukiReflection - An efficient Reflection API for Java and Android built in Kotlin * Copyright (C) 2019-2023 HighCapable * https://github.com/fankes/YukiReflection * diff --git a/yukireflection/src/main/java/com/highcapable/yukireflection/finder/base/ClassBaseFinder.kt b/yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/base/ClassBaseFinder.kt similarity index 97% rename from yukireflection/src/main/java/com/highcapable/yukireflection/finder/base/ClassBaseFinder.kt rename to yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/base/ClassBaseFinder.kt index c701833..692dc25 100644 --- a/yukireflection/src/main/java/com/highcapable/yukireflection/finder/base/ClassBaseFinder.kt +++ b/yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/base/ClassBaseFinder.kt @@ -1,5 +1,5 @@ /* - * YukiReflection - An efficient Reflection API for the Android platform built in Kotlin. + * YukiReflection - An efficient Reflection API for Java and Android built in Kotlin * Copyright (C) 2019-2023 HighCapable * https://github.com/fankes/YukiReflection * diff --git a/yukireflection/src/main/java/com/highcapable/yukireflection/finder/base/MemberBaseFinder.kt b/yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/base/MemberBaseFinder.kt similarity index 98% rename from yukireflection/src/main/java/com/highcapable/yukireflection/finder/base/MemberBaseFinder.kt rename to yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/base/MemberBaseFinder.kt index 6c088fa..201eb33 100644 --- a/yukireflection/src/main/java/com/highcapable/yukireflection/finder/base/MemberBaseFinder.kt +++ b/yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/base/MemberBaseFinder.kt @@ -1,5 +1,5 @@ /* - * YukiReflection - An efficient Reflection API for the Android platform built in Kotlin. + * YukiReflection - An efficient Reflection API for Java and Android built in Kotlin * Copyright (C) 2019-2023 HighCapable * https://github.com/fankes/YukiReflection * diff --git a/yukireflection/src/main/java/com/highcapable/yukireflection/finder/base/data/BaseRulesData.kt b/yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/base/data/BaseRulesData.kt similarity index 98% rename from yukireflection/src/main/java/com/highcapable/yukireflection/finder/base/data/BaseRulesData.kt rename to yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/base/data/BaseRulesData.kt index a33e0e7..7bbaa3c 100644 --- a/yukireflection/src/main/java/com/highcapable/yukireflection/finder/base/data/BaseRulesData.kt +++ b/yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/base/data/BaseRulesData.kt @@ -1,5 +1,5 @@ /* - * YukiReflection - An efficient Reflection API for the Android platform built in Kotlin. + * YukiReflection - An efficient Reflection API for Java and Android built in Kotlin * Copyright (C) 2019-2023 HighCapable * https://github.com/fankes/YukiReflection * diff --git a/yukireflection/src/main/java/com/highcapable/yukireflection/finder/base/rules/CountRules.kt b/yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/base/rules/CountRules.kt similarity index 96% rename from yukireflection/src/main/java/com/highcapable/yukireflection/finder/base/rules/CountRules.kt rename to yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/base/rules/CountRules.kt index 772a2da..4e7c5f5 100644 --- a/yukireflection/src/main/java/com/highcapable/yukireflection/finder/base/rules/CountRules.kt +++ b/yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/base/rules/CountRules.kt @@ -1,5 +1,5 @@ /* - * YukiReflection - An efficient Reflection API for the Android platform built in Kotlin. + * YukiReflection - An efficient Reflection API for Java and Android built in Kotlin * Copyright (C) 2019-2023 HighCapable * https://github.com/fankes/YukiReflection * diff --git a/yukireflection/src/main/java/com/highcapable/yukireflection/finder/base/rules/ModifierRules.kt b/yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/base/rules/ModifierRules.kt similarity index 98% rename from yukireflection/src/main/java/com/highcapable/yukireflection/finder/base/rules/ModifierRules.kt rename to yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/base/rules/ModifierRules.kt index 52735c2..ca5e3aa 100644 --- a/yukireflection/src/main/java/com/highcapable/yukireflection/finder/base/rules/ModifierRules.kt +++ b/yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/base/rules/ModifierRules.kt @@ -1,5 +1,5 @@ /* - * YukiReflection - An efficient Reflection API for the Android platform built in Kotlin. + * YukiReflection - An efficient Reflection API for Java and Android built in Kotlin * Copyright (C) 2019-2023 HighCapable * https://github.com/fankes/YukiReflection * diff --git a/yukireflection/src/main/java/com/highcapable/yukireflection/finder/base/rules/NameRules.kt b/yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/base/rules/NameRules.kt similarity index 97% rename from yukireflection/src/main/java/com/highcapable/yukireflection/finder/base/rules/NameRules.kt rename to yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/base/rules/NameRules.kt index 32fc908..3b00b63 100644 --- a/yukireflection/src/main/java/com/highcapable/yukireflection/finder/base/rules/NameRules.kt +++ b/yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/base/rules/NameRules.kt @@ -1,5 +1,5 @@ /* - * YukiReflection - An efficient Reflection API for the Android platform built in Kotlin. + * YukiReflection - An efficient Reflection API for Java and Android built in Kotlin * Copyright (C) 2019-2023 HighCapable * https://github.com/fankes/YukiReflection * diff --git a/yukireflection/src/main/java/com/highcapable/yukireflection/finder/base/rules/ObjectRules.kt b/yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/base/rules/ObjectRules.kt similarity index 95% rename from yukireflection/src/main/java/com/highcapable/yukireflection/finder/base/rules/ObjectRules.kt rename to yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/base/rules/ObjectRules.kt index 8cd1af1..c4c0608 100644 --- a/yukireflection/src/main/java/com/highcapable/yukireflection/finder/base/rules/ObjectRules.kt +++ b/yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/base/rules/ObjectRules.kt @@ -1,5 +1,5 @@ /* - * YukiReflection - An efficient Reflection API for the Android platform built in Kotlin. + * YukiReflection - An efficient Reflection API for Java and Android built in Kotlin * Copyright (C) 2019-2023 HighCapable * https://github.com/fankes/YukiReflection * diff --git a/yukireflection/src/main/java/com/highcapable/yukireflection/finder/classes/DexClassFinder.kt b/yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/classes/DexClassFinder.kt similarity index 98% rename from yukireflection/src/main/java/com/highcapable/yukireflection/finder/classes/DexClassFinder.kt rename to yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/classes/DexClassFinder.kt index c8c52cf..a133d4f 100644 --- a/yukireflection/src/main/java/com/highcapable/yukireflection/finder/classes/DexClassFinder.kt +++ b/yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/classes/DexClassFinder.kt @@ -1,5 +1,5 @@ /* - * YukiReflection - An efficient Reflection API for the Android platform built in Kotlin. + * YukiReflection - An efficient Reflection API for Java and Android built in Kotlin * Copyright (C) 2019-2023 HighCapable * https://github.com/fankes/YukiReflection * @@ -33,7 +33,6 @@ package com.highcapable.yukireflection.finder.classes import android.content.Context import android.content.SharedPreferences import android.content.pm.PackageManager -import androidx.core.content.pm.PackageInfoCompat import com.highcapable.yukireflection.annotation.YukiPrivateApi import com.highcapable.yukireflection.factory.hasClass import com.highcapable.yukireflection.factory.searchClass @@ -89,9 +88,9 @@ class DexClassFinder @PublishedApi internal constructor( * @return [SharedPreferences] or null */ private fun Context.currentSp(versionName: String? = null, versionCode: Long? = null) = runCatching { - @Suppress("DEPRECATION") + @Suppress("NewApi", "DEPRECATION", "KotlinRedundantDiagnosticSuppress") getSharedPreferences(packageManager?.getPackageInfo(packageName, PackageManager.GET_META_DATA) - ?.let { "${CACHE_FILE_NAME}_${versionName ?: it.versionName}_${versionCode ?: PackageInfoCompat.getLongVersionCode(it)}" } + ?.let { "${CACHE_FILE_NAME}_${versionName ?: it.versionName}_${versionCode ?: runCatching { it.longVersionCode }.getOrNull() ?: it.versionCode}" } ?: "${CACHE_FILE_NAME}_unknown", Context.MODE_PRIVATE) }.onFailure { yLoggerW(msg = "Failed to read app's SharedPreferences when using DexClassFinder\n${it.toStackTrace()}") }.getOrNull() diff --git a/yukireflection/src/main/java/com/highcapable/yukireflection/finder/classes/data/ClassRulesData.kt b/yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/classes/data/ClassRulesData.kt similarity index 98% rename from yukireflection/src/main/java/com/highcapable/yukireflection/finder/classes/data/ClassRulesData.kt rename to yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/classes/data/ClassRulesData.kt index 76c147f..66bf7cc 100644 --- a/yukireflection/src/main/java/com/highcapable/yukireflection/finder/classes/data/ClassRulesData.kt +++ b/yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/classes/data/ClassRulesData.kt @@ -1,5 +1,5 @@ /* - * YukiReflection - An efficient Reflection API for the Android platform built in Kotlin. + * YukiReflection - An efficient Reflection API for Java and Android built in Kotlin * Copyright (C) 2019-2023 HighCapable * https://github.com/fankes/YukiReflection * diff --git a/yukireflection/src/main/java/com/highcapable/yukireflection/finder/classes/rules/ConstructorRules.kt b/yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/classes/rules/ConstructorRules.kt similarity index 98% rename from yukireflection/src/main/java/com/highcapable/yukireflection/finder/classes/rules/ConstructorRules.kt rename to yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/classes/rules/ConstructorRules.kt index 90d4141..91e61b9 100644 --- a/yukireflection/src/main/java/com/highcapable/yukireflection/finder/classes/rules/ConstructorRules.kt +++ b/yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/classes/rules/ConstructorRules.kt @@ -1,5 +1,5 @@ /* - * YukiReflection - An efficient Reflection API for the Android platform built in Kotlin. + * YukiReflection - An efficient Reflection API for Java and Android built in Kotlin * Copyright (C) 2019-2023 HighCapable * https://github.com/fankes/YukiReflection * diff --git a/yukireflection/src/main/java/com/highcapable/yukireflection/finder/classes/rules/FieldRules.kt b/yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/classes/rules/FieldRules.kt similarity index 97% rename from yukireflection/src/main/java/com/highcapable/yukireflection/finder/classes/rules/FieldRules.kt rename to yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/classes/rules/FieldRules.kt index 83e291d..d48880a 100644 --- a/yukireflection/src/main/java/com/highcapable/yukireflection/finder/classes/rules/FieldRules.kt +++ b/yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/classes/rules/FieldRules.kt @@ -1,5 +1,5 @@ /* - * YukiReflection - An efficient Reflection API for the Android platform built in Kotlin. + * YukiReflection - An efficient Reflection API for Java and Android built in Kotlin * Copyright (C) 2019-2023 HighCapable * https://github.com/fankes/YukiReflection * diff --git a/yukireflection/src/main/java/com/highcapable/yukireflection/finder/classes/rules/MemberRules.kt b/yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/classes/rules/MemberRules.kt similarity index 96% rename from yukireflection/src/main/java/com/highcapable/yukireflection/finder/classes/rules/MemberRules.kt rename to yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/classes/rules/MemberRules.kt index f5b766a..9e1f53d 100644 --- a/yukireflection/src/main/java/com/highcapable/yukireflection/finder/classes/rules/MemberRules.kt +++ b/yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/classes/rules/MemberRules.kt @@ -1,5 +1,5 @@ /* - * YukiReflection - An efficient Reflection API for the Android platform built in Kotlin. + * YukiReflection - An efficient Reflection API for Java and Android built in Kotlin * Copyright (C) 2019-2023 HighCapable * https://github.com/fankes/YukiReflection * diff --git a/yukireflection/src/main/java/com/highcapable/yukireflection/finder/classes/rules/MethodRules.kt b/yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/classes/rules/MethodRules.kt similarity index 98% rename from yukireflection/src/main/java/com/highcapable/yukireflection/finder/classes/rules/MethodRules.kt rename to yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/classes/rules/MethodRules.kt index f743187..5c24685 100644 --- a/yukireflection/src/main/java/com/highcapable/yukireflection/finder/classes/rules/MethodRules.kt +++ b/yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/classes/rules/MethodRules.kt @@ -1,5 +1,5 @@ /* - * YukiReflection - An efficient Reflection API for the Android platform built in Kotlin. + * YukiReflection - An efficient Reflection API for Java and Android built in Kotlin * Copyright (C) 2019-2023 HighCapable * https://github.com/fankes/YukiReflection * diff --git a/yukireflection/src/main/java/com/highcapable/yukireflection/finder/classes/rules/base/BaseRules.kt b/yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/classes/rules/base/BaseRules.kt similarity index 97% rename from yukireflection/src/main/java/com/highcapable/yukireflection/finder/classes/rules/base/BaseRules.kt rename to yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/classes/rules/base/BaseRules.kt index a9f7aed..287ff5b 100644 --- a/yukireflection/src/main/java/com/highcapable/yukireflection/finder/classes/rules/base/BaseRules.kt +++ b/yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/classes/rules/base/BaseRules.kt @@ -1,5 +1,5 @@ /* - * YukiReflection - An efficient Reflection API for the Android platform built in Kotlin. + * YukiReflection - An efficient Reflection API for Java and Android built in Kotlin * Copyright (C) 2019-2023 HighCapable * https://github.com/fankes/YukiReflection * diff --git a/yukireflection/src/main/java/com/highcapable/yukireflection/finder/classes/rules/result/MemberRulesResult.kt b/yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/classes/rules/result/MemberRulesResult.kt similarity index 97% rename from yukireflection/src/main/java/com/highcapable/yukireflection/finder/classes/rules/result/MemberRulesResult.kt rename to yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/classes/rules/result/MemberRulesResult.kt index c378b66..0888759 100644 --- a/yukireflection/src/main/java/com/highcapable/yukireflection/finder/classes/rules/result/MemberRulesResult.kt +++ b/yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/classes/rules/result/MemberRulesResult.kt @@ -1,5 +1,5 @@ /* - * YukiReflection - An efficient Reflection API for the Android platform built in Kotlin. + * YukiReflection - An efficient Reflection API for Java and Android built in Kotlin * Copyright (C) 2019-2023 HighCapable * https://github.com/fankes/YukiReflection * diff --git a/yukireflection/src/main/java/com/highcapable/yukireflection/finder/members/ConstructorFinder.kt b/yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/members/ConstructorFinder.kt similarity index 99% rename from yukireflection/src/main/java/com/highcapable/yukireflection/finder/members/ConstructorFinder.kt rename to yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/members/ConstructorFinder.kt index c9f1567..dede8c1 100644 --- a/yukireflection/src/main/java/com/highcapable/yukireflection/finder/members/ConstructorFinder.kt +++ b/yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/members/ConstructorFinder.kt @@ -1,5 +1,5 @@ /* - * YukiReflection - An efficient Reflection API for the Android platform built in Kotlin. + * YukiReflection - An efficient Reflection API for Java and Android built in Kotlin * Copyright (C) 2019-2023 HighCapable * https://github.com/fankes/YukiReflection * diff --git a/yukireflection/src/main/java/com/highcapable/yukireflection/finder/members/FieldFinder.kt b/yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/members/FieldFinder.kt similarity index 99% rename from yukireflection/src/main/java/com/highcapable/yukireflection/finder/members/FieldFinder.kt rename to yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/members/FieldFinder.kt index 0fc9579..8fdb01a 100644 --- a/yukireflection/src/main/java/com/highcapable/yukireflection/finder/members/FieldFinder.kt +++ b/yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/members/FieldFinder.kt @@ -1,5 +1,5 @@ /* - * YukiReflection - An efficient Reflection API for the Android platform built in Kotlin. + * YukiReflection - An efficient Reflection API for Java and Android built in Kotlin * Copyright (C) 2019-2023 HighCapable * https://github.com/fankes/YukiReflection * diff --git a/yukireflection/src/main/java/com/highcapable/yukireflection/finder/members/MethodFinder.kt b/yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/members/MethodFinder.kt similarity index 99% rename from yukireflection/src/main/java/com/highcapable/yukireflection/finder/members/MethodFinder.kt rename to yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/members/MethodFinder.kt index 9cc3169..061df88 100644 --- a/yukireflection/src/main/java/com/highcapable/yukireflection/finder/members/MethodFinder.kt +++ b/yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/members/MethodFinder.kt @@ -1,5 +1,5 @@ /* - * YukiReflection - An efficient Reflection API for the Android platform built in Kotlin. + * YukiReflection - An efficient Reflection API for Java and Android built in Kotlin * Copyright (C) 2019-2023 HighCapable * https://github.com/fankes/YukiReflection * diff --git a/yukireflection/src/main/java/com/highcapable/yukireflection/finder/members/data/ConstructorRulesData.kt b/yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/members/data/ConstructorRulesData.kt similarity index 97% rename from yukireflection/src/main/java/com/highcapable/yukireflection/finder/members/data/ConstructorRulesData.kt rename to yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/members/data/ConstructorRulesData.kt index 7447c29..3e35b1e 100644 --- a/yukireflection/src/main/java/com/highcapable/yukireflection/finder/members/data/ConstructorRulesData.kt +++ b/yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/members/data/ConstructorRulesData.kt @@ -1,5 +1,5 @@ /* - * YukiReflection - An efficient Reflection API for the Android platform built in Kotlin. + * YukiReflection - An efficient Reflection API for Java and Android built in Kotlin * Copyright (C) 2019-2023 HighCapable * https://github.com/fankes/YukiReflection * diff --git a/yukireflection/src/main/java/com/highcapable/yukireflection/finder/members/data/FieldRulesData.kt b/yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/members/data/FieldRulesData.kt similarity index 96% rename from yukireflection/src/main/java/com/highcapable/yukireflection/finder/members/data/FieldRulesData.kt rename to yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/members/data/FieldRulesData.kt index 3353e5d..b25c620 100644 --- a/yukireflection/src/main/java/com/highcapable/yukireflection/finder/members/data/FieldRulesData.kt +++ b/yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/members/data/FieldRulesData.kt @@ -1,5 +1,5 @@ /* - * YukiReflection - An efficient Reflection API for the Android platform built in Kotlin. + * YukiReflection - An efficient Reflection API for Java and Android built in Kotlin * Copyright (C) 2019-2023 HighCapable * https://github.com/fankes/YukiReflection * diff --git a/yukireflection/src/main/java/com/highcapable/yukireflection/finder/members/data/MemberRulesData.kt b/yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/members/data/MemberRulesData.kt similarity index 97% rename from yukireflection/src/main/java/com/highcapable/yukireflection/finder/members/data/MemberRulesData.kt rename to yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/members/data/MemberRulesData.kt index 0272675..8afab0e 100644 --- a/yukireflection/src/main/java/com/highcapable/yukireflection/finder/members/data/MemberRulesData.kt +++ b/yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/members/data/MemberRulesData.kt @@ -1,5 +1,5 @@ /* - * YukiReflection - An efficient Reflection API for the Android platform built in Kotlin. + * YukiReflection - An efficient Reflection API for Java and Android built in Kotlin * Copyright (C) 2019-2023 HighCapable * https://github.com/fankes/YukiReflection * diff --git a/yukireflection/src/main/java/com/highcapable/yukireflection/finder/members/data/MethodRulesData.kt b/yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/members/data/MethodRulesData.kt similarity index 97% rename from yukireflection/src/main/java/com/highcapable/yukireflection/finder/members/data/MethodRulesData.kt rename to yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/members/data/MethodRulesData.kt index 2235d4f..ebd085d 100644 --- a/yukireflection/src/main/java/com/highcapable/yukireflection/finder/members/data/MethodRulesData.kt +++ b/yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/members/data/MethodRulesData.kt @@ -1,5 +1,5 @@ /* - * YukiReflection - An efficient Reflection API for the Android platform built in Kotlin. + * YukiReflection - An efficient Reflection API for Java and Android built in Kotlin * Copyright (C) 2019-2023 HighCapable * https://github.com/fankes/YukiReflection * diff --git a/yukireflection/src/main/java/com/highcapable/yukireflection/finder/tools/ReflectionTool.kt b/yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/tools/ReflectionTool.kt similarity index 99% rename from yukireflection/src/main/java/com/highcapable/yukireflection/finder/tools/ReflectionTool.kt rename to yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/tools/ReflectionTool.kt index a921eb8..5799c48 100644 --- a/yukireflection/src/main/java/com/highcapable/yukireflection/finder/tools/ReflectionTool.kt +++ b/yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/tools/ReflectionTool.kt @@ -1,5 +1,5 @@ /* - * YukiReflection - An efficient Reflection API for the Android platform built in Kotlin. + * YukiReflection - An efficient Reflection API for Java and Android built in Kotlin * Copyright (C) 2019-2023 HighCapable * https://github.com/fankes/YukiReflection * diff --git a/yukireflection/src/main/java/com/highcapable/yukireflection/finder/type/factory/TypeAliasFactory.kt b/yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/type/factory/TypeAliasFactory.kt similarity index 96% rename from yukireflection/src/main/java/com/highcapable/yukireflection/finder/type/factory/TypeAliasFactory.kt rename to yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/type/factory/TypeAliasFactory.kt index 225f172..7945cb1 100644 --- a/yukireflection/src/main/java/com/highcapable/yukireflection/finder/type/factory/TypeAliasFactory.kt +++ b/yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/type/factory/TypeAliasFactory.kt @@ -1,5 +1,5 @@ /* - * YukiReflection - An efficient Reflection API for the Android platform built in Kotlin. + * YukiReflection - An efficient Reflection API for Java and Android built in Kotlin * Copyright (C) 2019-2023 HighCapable * https://github.com/fankes/YukiReflection * diff --git a/yukireflection/src/main/java/com/highcapable/yukireflection/log/LoggerFactory.kt b/yukireflection-core/src/main/java/com/highcapable/yukireflection/log/LoggerFactory.kt similarity index 96% rename from yukireflection/src/main/java/com/highcapable/yukireflection/log/LoggerFactory.kt rename to yukireflection-core/src/main/java/com/highcapable/yukireflection/log/LoggerFactory.kt index 34748cc..d7b490a 100644 --- a/yukireflection/src/main/java/com/highcapable/yukireflection/log/LoggerFactory.kt +++ b/yukireflection-core/src/main/java/com/highcapable/yukireflection/log/LoggerFactory.kt @@ -1,5 +1,5 @@ /* - * YukiReflection - An efficient Reflection API for the Android platform built in Kotlin. + * YukiReflection - An efficient Reflection API for Java and Android built in Kotlin * Copyright (C) 2019-2023 HighCapable * https://github.com/fankes/YukiReflection * diff --git a/yukireflection/src/main/java/com/highcapable/yukireflection/type/android/ComponentTypeFactory.kt b/yukireflection-core/src/main/java/com/highcapable/yukireflection/type/android/ComponentTypeFactory.kt similarity index 99% rename from yukireflection/src/main/java/com/highcapable/yukireflection/type/android/ComponentTypeFactory.kt rename to yukireflection-core/src/main/java/com/highcapable/yukireflection/type/android/ComponentTypeFactory.kt index 9939938..4eee407 100644 --- a/yukireflection/src/main/java/com/highcapable/yukireflection/type/android/ComponentTypeFactory.kt +++ b/yukireflection-core/src/main/java/com/highcapable/yukireflection/type/android/ComponentTypeFactory.kt @@ -1,5 +1,5 @@ /* - * YukiReflection - An efficient Reflection API for the Android platform built in Kotlin. + * YukiReflection - An efficient Reflection API for Java and Android built in Kotlin * Copyright (C) 2019-2023 HighCapable * https://github.com/fankes/YukiReflection * diff --git a/yukireflection/src/main/java/com/highcapable/yukireflection/type/android/GraphicsTypeFactory.kt b/yukireflection-core/src/main/java/com/highcapable/yukireflection/type/android/GraphicsTypeFactory.kt similarity index 98% rename from yukireflection/src/main/java/com/highcapable/yukireflection/type/android/GraphicsTypeFactory.kt rename to yukireflection-core/src/main/java/com/highcapable/yukireflection/type/android/GraphicsTypeFactory.kt index ce70ffd..2cc57ae 100644 --- a/yukireflection/src/main/java/com/highcapable/yukireflection/type/android/GraphicsTypeFactory.kt +++ b/yukireflection-core/src/main/java/com/highcapable/yukireflection/type/android/GraphicsTypeFactory.kt @@ -1,5 +1,5 @@ /* - * YukiReflection - An efficient Reflection API for the Android platform built in Kotlin. + * YukiReflection - An efficient Reflection API for Java and Android built in Kotlin * Copyright (C) 2019-2023 HighCapable * https://github.com/fankes/YukiReflection * diff --git a/yukireflection/src/main/java/com/highcapable/yukireflection/type/android/ViewTypeFactory.kt b/yukireflection-core/src/main/java/com/highcapable/yukireflection/type/android/ViewTypeFactory.kt similarity index 98% rename from yukireflection/src/main/java/com/highcapable/yukireflection/type/android/ViewTypeFactory.kt rename to yukireflection-core/src/main/java/com/highcapable/yukireflection/type/android/ViewTypeFactory.kt index f006370..fd99d09 100644 --- a/yukireflection/src/main/java/com/highcapable/yukireflection/type/android/ViewTypeFactory.kt +++ b/yukireflection-core/src/main/java/com/highcapable/yukireflection/type/android/ViewTypeFactory.kt @@ -1,5 +1,5 @@ /* - * YukiReflection - An efficient Reflection API for the Android platform built in Kotlin. + * YukiReflection - An efficient Reflection API for Java and Android built in Kotlin * Copyright (C) 2019-2023 HighCapable * https://github.com/fankes/YukiReflection * diff --git a/yukireflection/src/main/java/com/highcapable/yukireflection/type/defined/DefinedTypeFactory.kt b/yukireflection-core/src/main/java/com/highcapable/yukireflection/type/defined/DefinedTypeFactory.kt similarity index 93% rename from yukireflection/src/main/java/com/highcapable/yukireflection/type/defined/DefinedTypeFactory.kt rename to yukireflection-core/src/main/java/com/highcapable/yukireflection/type/defined/DefinedTypeFactory.kt index 8896e36..c9a1369 100644 --- a/yukireflection/src/main/java/com/highcapable/yukireflection/type/defined/DefinedTypeFactory.kt +++ b/yukireflection-core/src/main/java/com/highcapable/yukireflection/type/defined/DefinedTypeFactory.kt @@ -1,5 +1,5 @@ /* - * YukiReflection - An efficient Reflection API for the Android platform built in Kotlin. + * YukiReflection - An efficient Reflection API for Java and Android built in Kotlin * Copyright (C) 2019-2023 HighCapable * https://github.com/fankes/YukiReflection * diff --git a/yukireflection/src/main/java/com/highcapable/yukireflection/type/java/VariableTypeFactory.kt b/yukireflection-core/src/main/java/com/highcapable/yukireflection/type/java/VariableTypeFactory.kt similarity index 99% rename from yukireflection/src/main/java/com/highcapable/yukireflection/type/java/VariableTypeFactory.kt rename to yukireflection-core/src/main/java/com/highcapable/yukireflection/type/java/VariableTypeFactory.kt index 2a9af56..667396c 100644 --- a/yukireflection/src/main/java/com/highcapable/yukireflection/type/java/VariableTypeFactory.kt +++ b/yukireflection-core/src/main/java/com/highcapable/yukireflection/type/java/VariableTypeFactory.kt @@ -1,5 +1,5 @@ /* - * YukiReflection - An efficient Reflection API for the Android platform built in Kotlin. + * YukiReflection - An efficient Reflection API for Java and Android built in Kotlin * Copyright (C) 2019-2023 HighCapable * https://github.com/fankes/YukiReflection * diff --git a/yukireflection/src/main/java/com/highcapable/yukireflection/utils/UtilsFactory.kt b/yukireflection-core/src/main/java/com/highcapable/yukireflection/utils/UtilsFactory.kt similarity index 98% rename from yukireflection/src/main/java/com/highcapable/yukireflection/utils/UtilsFactory.kt rename to yukireflection-core/src/main/java/com/highcapable/yukireflection/utils/UtilsFactory.kt index b9a6879..97dde42 100644 --- a/yukireflection/src/main/java/com/highcapable/yukireflection/utils/UtilsFactory.kt +++ b/yukireflection-core/src/main/java/com/highcapable/yukireflection/utils/UtilsFactory.kt @@ -1,5 +1,5 @@ /* - * YukiReflection - An efficient Reflection API for the Android platform built in Kotlin. + * YukiReflection - An efficient Reflection API for Java and Android built in Kotlin * Copyright (C) 2019-2023 HighCapable * https://github.com/fankes/YukiReflection * diff --git a/yukireflection/consumer-rules.pro b/yukireflection/consumer-rules.pro deleted file mode 100644 index e69de29..0000000 diff --git a/yukireflection/proguard-rules.pro b/yukireflection/proguard-rules.pro deleted file mode 100644 index 481bb43..0000000 --- a/yukireflection/proguard-rules.pro +++ /dev/null @@ -1,21 +0,0 @@ -# Add project specific ProGuard rules here. -# You can control the set of applied configuration files using the -# proguardFiles setting in build.gradle. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html - -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#} - -# Uncomment this to preserve the line number information for -# debugging stack traces. -#-keepattributes SourceFile,LineNumberTable - -# If you keep the line number information, uncomment this to -# hide the original source file name. -#-renamesourcefileattribute SourceFile \ No newline at end of file diff --git a/yukireflection/src/main/AndroidManifest.xml b/yukireflection/src/main/AndroidManifest.xml deleted file mode 100644 index 568741e..0000000 --- a/yukireflection/src/main/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file