mirror of
https://github.com/HighCapable/SweetProperty.git
synced 2025-09-05 10:15:36 +08:00
Compare commits
49 Commits
1.0.5
...
283444e0d5
Author | SHA1 | Date | |
---|---|---|---|
283444e0d5
|
|||
b4fdbe6ad9
|
|||
0ae3f9a748
|
|||
a836ad9289
|
|||
d04a57c549
|
|||
308f1618ab
|
|||
36c7af3c52
|
|||
34b11eb5b7
|
|||
72037d6f08
|
|||
cf4b59db1a
|
|||
74da386f49
|
|||
ceccd2e2cf
|
|||
|
22b0a1be2c | ||
|
a16da731cf | ||
99a6e02d1d
|
|||
9e7d5ec574
|
|||
f00c6e718c
|
|||
1e513489c8
|
|||
fdab590578
|
|||
dd85954691
|
|||
37644fcd8d
|
|||
341a7497ec
|
|||
138551dd44
|
|||
d54aebefca
|
|||
7b24cd442e
|
|||
77c374d6b6
|
|||
f2bdbb8124
|
|||
21d4857d5c
|
|||
f5ab29e6b6
|
|||
255bd4035e
|
|||
98ca5dbc29
|
|||
91cfa2f30a
|
|||
68bfcc9b5a
|
|||
3481495626
|
|||
7acba690fb
|
|||
c7ec2ab836
|
|||
89626aeca7
|
|||
59453292f3
|
|||
c12e55dbc1
|
|||
192d3c9a5e
|
|||
e5e5915618
|
|||
e28c9feb20
|
|||
595e3768f7
|
|||
179462c0ae
|
|||
90f36ac825
|
|||
8a71e739c0
|
|||
4eaaf82430
|
|||
ef19ea07a5
|
|||
c98dfb6b3d
|
@@ -10,6 +10,24 @@ ktlint_standard_argument-list-wrapping = disabled
|
|||||||
ktlint_standard_parameter-list-wrapping = disabled
|
ktlint_standard_parameter-list-wrapping = disabled
|
||||||
ktlint_standard_trailing-comma-on-declaration-site = disabled
|
ktlint_standard_trailing-comma-on-declaration-site = disabled
|
||||||
ktlint_function_signature_body_expression_wrapping = multiline
|
ktlint_function_signature_body_expression_wrapping = multiline
|
||||||
|
ktlint_standard_string-template-indent = disabled
|
||||||
|
ktlint_standard_function-signature = disabled
|
||||||
|
ktlint_standard_trailing-comma-on-call-site = disabled
|
||||||
|
ktlint_standard_multiline-expression-wrapping = disabled
|
||||||
|
ktlint_standard_no-empty-first-line-in-class-body = disabled
|
||||||
|
ktlint_standard_if-else-wrapping = disabled
|
||||||
|
ktlint_standard_if-else-bracing = disabled
|
||||||
|
ktlint_standard_statement-wrapping = disabled
|
||||||
|
ktlint_standard_blank-line-before-declaration = disabled
|
||||||
|
ktlint_standard_no-empty-file = disabled
|
||||||
|
ktlint_standard_property-naming = disabled
|
||||||
|
ktlint_standard_function-naming = disabled
|
||||||
|
ktlint_standard_chain-method-continuation = disabled
|
||||||
|
ktlint_standard_class-signature = disabled
|
||||||
|
ktlint_standard_condition-wrapping = disabled
|
||||||
|
ktlint_standard_class-signature = disabled
|
||||||
|
ktlint_standard_no-trailing-spaces = disabled
|
||||||
|
ktlint_standard_multiline-loop = disabled
|
||||||
ij_continuation_indent_size = 2
|
ij_continuation_indent_size = 2
|
||||||
indent_size = 4
|
indent_size = 4
|
||||||
indent_style = space
|
indent_style = space
|
||||||
|
117
.gitignore
vendored
117
.gitignore
vendored
@@ -1,13 +1,110 @@
|
|||||||
|
## Fully .gtignore for IntelliJ, Android Studio and Gradle based Java projects
|
||||||
|
## References:
|
||||||
|
## - https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
||||||
|
## - https://github.com/android/platform-samples/blob/main/.gitignore
|
||||||
|
|
||||||
|
# User-specific stuff
|
||||||
|
.idea/**/workspace.xml
|
||||||
|
.idea/**/tasks.xml
|
||||||
|
.idea/**/usage.statistics.xml
|
||||||
|
.idea/**/dictionaries
|
||||||
|
.idea/**/shelf
|
||||||
|
|
||||||
|
# AWS User-specific
|
||||||
|
.idea/**/aws.xml
|
||||||
|
|
||||||
|
# Generated files
|
||||||
|
.idea/**/contentModel.xml
|
||||||
|
|
||||||
|
# Sensitive or high-churn files
|
||||||
|
.idea/**/dataSources/
|
||||||
|
.idea/**/dataSources.ids
|
||||||
|
.idea/**/dataSources.local.xml
|
||||||
|
.idea/**/sqlDataSources.xml
|
||||||
|
.idea/**/dynamic.xml
|
||||||
|
.idea/**/uiDesigner.xml
|
||||||
|
.idea/**/dbnavigator.xml
|
||||||
|
|
||||||
|
# Gradle
|
||||||
|
.idea/**/gradle.xml
|
||||||
|
.idea/**/libraries
|
||||||
|
|
||||||
|
# Gradle and Maven with auto-import
|
||||||
|
.idea/.name
|
||||||
|
.idea/artifacts
|
||||||
|
.idea/compiler.xml
|
||||||
|
.idea/jarRepositories.xml
|
||||||
|
.idea/modules.xml
|
||||||
|
.idea/*.iml
|
||||||
|
.idea/modules
|
||||||
|
.idea/caches
|
||||||
|
.idea/material_theme**
|
||||||
|
.idea/other.xml
|
||||||
*.iml
|
*.iml
|
||||||
.gradle
|
*.ipr
|
||||||
/.idea/caches
|
|
||||||
/.idea/libraries
|
# Kotlin
|
||||||
/.idea/modules.xml
|
.kotlin
|
||||||
/.idea/workspace.xml
|
|
||||||
/.idea/navEditor.xml
|
# Misc
|
||||||
/.idea/assetWizardSettings.xml
|
.idea/misc.xml
|
||||||
.DS_Store
|
|
||||||
/build
|
# CMake
|
||||||
|
cmake-build-*/
|
||||||
|
|
||||||
|
# Mongo Explorer plugin
|
||||||
|
.idea/**/mongoSettings.xml
|
||||||
|
|
||||||
|
# File-based project format
|
||||||
|
*.iws
|
||||||
|
|
||||||
|
# IntelliJ
|
||||||
|
out/
|
||||||
|
|
||||||
|
# mpeltonen/sbt-idea plugin
|
||||||
|
.idea_modules/
|
||||||
|
|
||||||
|
# JIRA plugin
|
||||||
|
atlassian-ide-plugin.xml
|
||||||
|
|
||||||
|
# Cursive Clojure plugin
|
||||||
|
.idea/replstate.xml
|
||||||
|
|
||||||
|
# SonarLint plugin
|
||||||
|
.idea/sonarlint/
|
||||||
|
|
||||||
|
# Crashlytics plugin (for Android Studio and IntelliJ)
|
||||||
|
com_crashlytics_export_strings.xml
|
||||||
|
crashlytics.properties
|
||||||
|
crashlytics-build.properties
|
||||||
|
fabric.properties
|
||||||
|
|
||||||
|
# Editor-based Rest Client
|
||||||
|
.idea/httpRequests
|
||||||
|
|
||||||
|
# Android studio 3.1+ serialized cache file
|
||||||
|
.idea/caches/build_file_checksums.ser
|
||||||
|
|
||||||
|
# Android studio 3.1+ additional
|
||||||
|
.idea/deployment*.xml
|
||||||
|
.idea/assetWizardSettings.xml
|
||||||
|
.idea/androidTestResultsUserPreferences.xml
|
||||||
|
|
||||||
|
# Android projects
|
||||||
|
**/local.properties
|
||||||
/captures
|
/captures
|
||||||
.externalNativeBuild
|
.externalNativeBuild
|
||||||
.cxx
|
.cxx
|
||||||
|
|
||||||
|
# Gradle projects
|
||||||
|
.gradle
|
||||||
|
build/
|
||||||
|
|
||||||
|
# Mkdocs temporary serving folder
|
||||||
|
docs-gen
|
||||||
|
site
|
||||||
|
*.bak
|
||||||
|
.idea/appInsightsSettings.xml
|
||||||
|
|
||||||
|
# Mac OS
|
||||||
|
.DS_Store
|
10
.idea/.gitignore
generated
vendored
10
.idea/.gitignore
generated
vendored
@@ -1,10 +0,0 @@
|
|||||||
# Default ignored files
|
|
||||||
/shelf/
|
|
||||||
/workspace.xml
|
|
||||||
/gradle.xml
|
|
||||||
/misc.xml
|
|
||||||
# Editor-based HTTP Client requests
|
|
||||||
/httpRequests/
|
|
||||||
# Datasource local storage ignored files
|
|
||||||
/dataSources/
|
|
||||||
/dataSources.local.xml
|
|
6
.idea/compiler.xml
generated
6
.idea/compiler.xml
generated
@@ -1,6 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="CompilerConfiguration">
|
|
||||||
<bytecodeTargetLevel target="17" />
|
|
||||||
</component>
|
|
||||||
</project>
|
|
1
.idea/inspectionProfiles/Project_Default.xml
generated
1
.idea/inspectionProfiles/Project_Default.xml
generated
@@ -1,6 +1,7 @@
|
|||||||
<component name="InspectionProjectProfileManager">
|
<component name="InspectionProjectProfileManager">
|
||||||
<profile version="1.0">
|
<profile version="1.0">
|
||||||
<option name="myName" value="Project Default" />
|
<option name="myName" value="Project Default" />
|
||||||
|
<inspection_tool class="CheckImageSize" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||||
<inspection_tool class="ReplaceUntilWithRangeUntil" enabled="true" level="WEAK WARNING" enabled_by_default="true" />
|
<inspection_tool class="ReplaceUntilWithRangeUntil" enabled="true" level="WEAK WARNING" enabled_by_default="true" />
|
||||||
<inspection_tool class="SpellCheckingInspection" enabled="false" level="TYPO" enabled_by_default="false">
|
<inspection_tool class="SpellCheckingInspection" enabled="false" level="TYPO" enabled_by_default="false">
|
||||||
<option name="processCode" value="true" />
|
<option name="processCode" value="true" />
|
||||||
|
20
.idea/jarRepositories.xml
generated
20
.idea/jarRepositories.xml
generated
@@ -1,20 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="RemoteRepositoriesConfiguration">
|
|
||||||
<remote-repository>
|
|
||||||
<option name="id" value="central" />
|
|
||||||
<option name="name" value="Maven Central repository" />
|
|
||||||
<option name="url" value="https://repo1.maven.org/maven2" />
|
|
||||||
</remote-repository>
|
|
||||||
<remote-repository>
|
|
||||||
<option name="id" value="jboss.community" />
|
|
||||||
<option name="name" value="JBoss Community repository" />
|
|
||||||
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
|
|
||||||
</remote-repository>
|
|
||||||
<remote-repository>
|
|
||||||
<option name="id" value="MavenRepo" />
|
|
||||||
<option name="name" value="MavenRepo" />
|
|
||||||
<option name="url" value="https://repo.maven.apache.org/maven2/" />
|
|
||||||
</remote-repository>
|
|
||||||
</component>
|
|
||||||
</project>
|
|
2
.idea/kotlinc.xml
generated
2
.idea/kotlinc.xml
generated
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="KotlinJpsPluginSettings">
|
<component name="KotlinJpsPluginSettings">
|
||||||
<option name="version" value="1.9.20" />
|
<option name="version" value="2.2.10" />
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
7
.idea/ktlint-plugin.xml
generated
Normal file
7
.idea/ktlint-plugin.xml
generated
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="KtLint plugin">
|
||||||
|
<ktlintMode>MANUAL</ktlintMode>
|
||||||
|
<formatOnSave>false</formatOnSave>
|
||||||
|
</component>
|
||||||
|
</project>
|
6
.idea/markdown.xml
generated
Normal file
6
.idea/markdown.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="MarkdownSettings">
|
||||||
|
<option name="showProblemsInCodeBlocks" value="false" />
|
||||||
|
</component>
|
||||||
|
</project>
|
124
.idea/uiDesigner.xml
generated
124
.idea/uiDesigner.xml
generated
@@ -1,124 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="Palette2">
|
|
||||||
<group name="Swing">
|
|
||||||
<item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
|
||||||
<default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
|
|
||||||
</item>
|
|
||||||
<item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
|
||||||
<default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
|
|
||||||
</item>
|
|
||||||
<item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
|
||||||
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
|
|
||||||
</item>
|
|
||||||
<item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.svg" removable="false" auto-create-binding="false" can-attach-label="true">
|
|
||||||
<default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
|
|
||||||
</item>
|
|
||||||
<item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
|
||||||
<default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
|
|
||||||
<initial-values>
|
|
||||||
<property name="text" value="Button" />
|
|
||||||
</initial-values>
|
|
||||||
</item>
|
|
||||||
<item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
|
||||||
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
|
|
||||||
<initial-values>
|
|
||||||
<property name="text" value="RadioButton" />
|
|
||||||
</initial-values>
|
|
||||||
</item>
|
|
||||||
<item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
|
||||||
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
|
|
||||||
<initial-values>
|
|
||||||
<property name="text" value="CheckBox" />
|
|
||||||
</initial-values>
|
|
||||||
</item>
|
|
||||||
<item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
|
||||||
<default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
|
|
||||||
<initial-values>
|
|
||||||
<property name="text" value="Label" />
|
|
||||||
</initial-values>
|
|
||||||
</item>
|
|
||||||
<item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
|
||||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
|
||||||
<preferred-size width="150" height="-1" />
|
|
||||||
</default-constraints>
|
|
||||||
</item>
|
|
||||||
<item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
|
||||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
|
||||||
<preferred-size width="150" height="-1" />
|
|
||||||
</default-constraints>
|
|
||||||
</item>
|
|
||||||
<item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
|
||||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
|
||||||
<preferred-size width="150" height="-1" />
|
|
||||||
</default-constraints>
|
|
||||||
</item>
|
|
||||||
<item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
|
||||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
|
||||||
<preferred-size width="150" height="50" />
|
|
||||||
</default-constraints>
|
|
||||||
</item>
|
|
||||||
<item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
|
||||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
|
||||||
<preferred-size width="150" height="50" />
|
|
||||||
</default-constraints>
|
|
||||||
</item>
|
|
||||||
<item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
|
||||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
|
||||||
<preferred-size width="150" height="50" />
|
|
||||||
</default-constraints>
|
|
||||||
</item>
|
|
||||||
<item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
|
||||||
<default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
|
|
||||||
</item>
|
|
||||||
<item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
|
||||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
|
||||||
<preferred-size width="150" height="50" />
|
|
||||||
</default-constraints>
|
|
||||||
</item>
|
|
||||||
<item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
|
||||||
<default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
|
|
||||||
<preferred-size width="150" height="50" />
|
|
||||||
</default-constraints>
|
|
||||||
</item>
|
|
||||||
<item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
|
||||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
|
||||||
<preferred-size width="150" height="50" />
|
|
||||||
</default-constraints>
|
|
||||||
</item>
|
|
||||||
<item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
|
||||||
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
|
|
||||||
<preferred-size width="200" height="200" />
|
|
||||||
</default-constraints>
|
|
||||||
</item>
|
|
||||||
<item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
|
||||||
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
|
|
||||||
<preferred-size width="200" height="200" />
|
|
||||||
</default-constraints>
|
|
||||||
</item>
|
|
||||||
<item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
|
||||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
|
|
||||||
</item>
|
|
||||||
<item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
|
||||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
|
|
||||||
</item>
|
|
||||||
<item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
|
||||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
|
|
||||||
</item>
|
|
||||||
<item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
|
||||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
|
|
||||||
</item>
|
|
||||||
<item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
|
||||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
|
|
||||||
<preferred-size width="-1" height="20" />
|
|
||||||
</default-constraints>
|
|
||||||
</item>
|
|
||||||
<item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
|
||||||
<default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
|
|
||||||
</item>
|
|
||||||
<item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
|
||||||
<default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
|
|
||||||
</item>
|
|
||||||
</group>
|
|
||||||
</component>
|
|
||||||
</project>
|
|
@@ -1,14 +1,15 @@
|
|||||||
# Sweet Property
|
# Sweet Property
|
||||||
|
|
||||||
[](https://github.com/HighCapable/SweetProperty/blob/master/LICENSE)
|
[](https://github.com/HighCapable/SweetProperty/blob/master/LICENSE)
|
||||||
[](https://github.com/HighCapable/SweetProperty/releases)
|
[](https://github.com/HighCapable/SweetProperty/releases)
|
||||||
[](https://t.me/HighCapable_Dev)
|
[](https://t.me/HighCapable_Dev)
|
||||||
|
[](https://qm.qq.com/cgi-bin/qm/qr?k=Pnsc5RY6N2mBKFjOLPiYldbAbprAU3V7&jump_from=webapi&authKey=X5EsOVzLXt1dRunge8ryTxDRrh9/IiW1Pua75eDLh9RE3KXE+bwXIYF5cWri/9lf)
|
||||||
|
|
||||||
<img src="https://github.com/HighCapable/SweetProperty/blob/master/img-src/icon.png?raw=true" width = "100" height = "100" alt="LOGO"/>
|
<img src="img-src/icon.png" width = "100" height = "100" alt="LOGO"/>
|
||||||
|
|
||||||
一个轻松在任意地方获取项目属性的 Gradle 插件。
|
一个轻松在任意地方获取项目属性的 Gradle 插件。
|
||||||
|
|
||||||
[English](https://github.com/HighCapable/SweetProperty/blob/master/README.md) | 简体中文
|
[English](README.md) | 简体中文
|
||||||
|
|
||||||
| <img src="https://github.com/HighCapable/.github/blob/main/img-src/logo.jpg?raw=true" width = "30" height = "30" alt="LOGO"/> | [HighCapable](https://github.com/HighCapable) |
|
| <img src="https://github.com/HighCapable/.github/blob/main/img-src/logo.jpg?raw=true" width = "30" height = "30" alt="LOGO"/> | [HighCapable](https://github.com/HighCapable) |
|
||||||
|-------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------|
|
|-------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------|
|
||||||
@@ -43,11 +44,11 @@
|
|||||||
|
|
||||||
## 开始使用
|
## 开始使用
|
||||||
|
|
||||||
- [点击这里](https://github.com/HighCapable/SweetProperty/blob/master/docs/guide-zh-CN.md) 查看使用文档
|
- [点击这里](docs/guide-zh-CN.md) 查看使用文档
|
||||||
|
|
||||||
## 更新日志
|
## 更新日志
|
||||||
|
|
||||||
- [点击这里](https://github.com/HighCapable/SweetProperty/blob/master/docs/changelog-zh-CN.md) 查看历史更新日志
|
- [点击这里](docs/changelog-zh-CN.md) 查看历史更新日志
|
||||||
|
|
||||||
## 项目推广
|
## 项目推广
|
||||||
|
|
||||||
@@ -55,11 +56,14 @@
|
|||||||
|
|
||||||
本项目同样使用了 **SweetDependency**。
|
本项目同样使用了 **SweetDependency**。
|
||||||
|
|
||||||
## 捐赠支持
|
<!--suppress HtmlDeprecatedAttribute -->
|
||||||
|
<div align="center">
|
||||||
工作不易,无意外情况此项目将继续维护下去,提供更多可能,欢迎打赏。
|
<h2>嘿,还请君留步!👋</h2>
|
||||||
|
<h3>这里有 Android 开发工具、UI 设计、Gradle 插件、Xposed 模块和实用软件等相关项目。</h3>
|
||||||
<img src="https://github.com/fankes/fankes/blob/main/img-src/payment_code.jpg?raw=true" width = "500" alt="Payment Code"/>
|
<h3>如果下方的项目能为你提供帮助,不妨为我点个 star 吧!</h3>
|
||||||
|
<h3>所有项目免费、开源,遵循对应开源许可协议。</h3>
|
||||||
|
<h1><a href="https://github.com/fankes/fankes/blob/main/project-promote/README-zh-CN.md">→ 查看更多关于我的项目,请点击这里 ←</a></h1>
|
||||||
|
</div>
|
||||||
|
|
||||||
## Star History
|
## Star History
|
||||||
|
|
||||||
@@ -72,7 +76,7 @@
|
|||||||
```
|
```
|
||||||
Apache License Version 2.0
|
Apache License Version 2.0
|
||||||
|
|
||||||
Copyright (C) 2019-2023 HighCapable
|
Copyright (C) 2019 HighCapable
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
you may not use this file except in compliance with the License.
|
you may not use this file except in compliance with the License.
|
||||||
@@ -87,4 +91,4 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
```
|
```
|
||||||
|
|
||||||
版权所有 © 2019-2023 HighCapable
|
版权所有 © 2019 HighCapable
|
28
README.md
28
README.md
@@ -1,14 +1,15 @@
|
|||||||
# Sweet Property
|
# Sweet Property
|
||||||
|
|
||||||
[](https://github.com/HighCapable/SweetProperty/blob/master/LICENSE)
|
[](https://github.com/HighCapable/SweetProperty/blob/master/LICENSE)
|
||||||
[](https://github.com/HighCapable/SweetProperty/releases)
|
[](https://github.com/HighCapable/SweetProperty/releases)
|
||||||
[](https://t.me/HighCapable_Dev)
|
[](https://t.me/HighCapable_Dev)
|
||||||
|
[](https://qm.qq.com/cgi-bin/qm/qr?k=Pnsc5RY6N2mBKFjOLPiYldbAbprAU3V7&jump_from=webapi&authKey=X5EsOVzLXt1dRunge8ryTxDRrh9/IiW1Pua75eDLh9RE3KXE+bwXIYF5cWri/9lf)
|
||||||
|
|
||||||
<img src="https://github.com/HighCapable/SweetProperty/blob/master/img-src/icon.png?raw=true" width = "100" height = "100" alt="LOGO"/>
|
<img src="img-src/icon.png" width = "100" height = "100" alt="LOGO"/>
|
||||||
|
|
||||||
An easy get project properties anywhere Gradle plugin.
|
An easy get project properties anywhere Gradle plugin.
|
||||||
|
|
||||||
English | [简体中文](https://github.com/HighCapable/SweetProperty/blob/master/README-zh-CN.md)
|
English | [简体中文](README-zh-CN.md)
|
||||||
|
|
||||||
| <img src="https://github.com/HighCapable/.github/blob/main/img-src/logo.jpg?raw=true" width = "30" height = "30" alt="LOGO"/> | [HighCapable](https://github.com/HighCapable) |
|
| <img src="https://github.com/HighCapable/.github/blob/main/img-src/logo.jpg?raw=true" width = "30" height = "30" alt="LOGO"/> | [HighCapable](https://github.com/HighCapable) |
|
||||||
|-------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------|
|
|-------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------|
|
||||||
@@ -48,11 +49,11 @@ Some functions may be incompatible, support will be gradually dropped in the fut
|
|||||||
|
|
||||||
## Get Started
|
## Get Started
|
||||||
|
|
||||||
- [Click here](https://github.com/HighCapable/SweetProperty/blob/master/docs/guide.md) to view the documentation
|
- [Click here](docs/guide.md) to view the documentation
|
||||||
|
|
||||||
## Changelog
|
## Changelog
|
||||||
|
|
||||||
- [Click here](https://github.com/HighCapable/SweetProperty/blob/master/docs/changelog.md) to view the historical changelog
|
- [Click here](docs/changelog.md) to view the historical changelog
|
||||||
|
|
||||||
## Promotion
|
## Promotion
|
||||||
|
|
||||||
@@ -61,6 +62,15 @@ you can check out the [SweetDependency](https://github.com/HighCapable/SweetDepe
|
|||||||
|
|
||||||
This project also uses **SweetDependency**.
|
This project also uses **SweetDependency**.
|
||||||
|
|
||||||
|
<!--suppress HtmlDeprecatedAttribute -->
|
||||||
|
<div align="center">
|
||||||
|
<h2>Hey, please stay! 👋</h2>
|
||||||
|
<h3>Here are related projects such as Android development tools, UI design, Gradle plugins, Xposed Modules and practical software. </h3>
|
||||||
|
<h3>If the project below can help you, please give me a star! </h3>
|
||||||
|
<h3>All projects are free, open source, and follow the corresponding open source license agreement. </h3>
|
||||||
|
<h1><a href="https://github.com/fankes/fankes/blob/main/project-promote/README.md">→ To see more about my projects, please click here ←</a></h1>
|
||||||
|
</div>
|
||||||
|
|
||||||
## Star History
|
## Star History
|
||||||
|
|
||||||

|

|
||||||
@@ -72,7 +82,7 @@ This project also uses **SweetDependency**.
|
|||||||
```
|
```
|
||||||
Apache License Version 2.0
|
Apache License Version 2.0
|
||||||
|
|
||||||
Copyright (C) 2019-2023 HighCapable
|
Copyright (C) 2019 HighCapable
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
you may not use this file except in compliance with the License.
|
you may not use this file except in compliance with the License.
|
||||||
@@ -87,4 +97,4 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
```
|
```
|
||||||
|
|
||||||
Copyright © 2019-2023 HighCapable
|
Copyright © 2019 HighCapable
|
@@ -1,16 +1,4 @@
|
|||||||
plugins {
|
plugins {
|
||||||
autowire(libs.plugins.kotlin.jvm) apply false
|
autowire(libs.plugins.kotlin.jvm) apply false
|
||||||
}
|
autowire(libs.plugins.maven.publish) apply false
|
||||||
|
|
||||||
allprojects {
|
|
||||||
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
|
|
||||||
kotlinOptions {
|
|
||||||
jvmTarget = "17"
|
|
||||||
freeCompilerArgs = listOf(
|
|
||||||
"-Xno-param-assertions",
|
|
||||||
"-Xno-call-assertions",
|
|
||||||
"-Xno-receiver-assertions"
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
@@ -38,4 +38,13 @@
|
|||||||
|
|
||||||
## 1.0.5 | 2023.11.08
|
## 1.0.5 | 2023.11.08
|
||||||
|
|
||||||
- 修复遇到特殊字符和重复键值名称造成代码生成失败的严重问题
|
- 修复遇到特殊字符和重复键值名称造成代码生成失败的严重问题
|
||||||
|
|
||||||
|
## 1.0.8 | 2025.08.19
|
||||||
|
|
||||||
|
- 修复在新版 Android Gradle Plugin 及 Android Studio/IDEA 中部署源码路径时的错误
|
||||||
|
`removeContentEntry: removed content entry url 'build/generated/sweet-property' still exists after removing`
|
||||||
|
- 新增 `sourceSetName` 方法,允许自定义要部署的源集名称
|
||||||
|
- 修复在类型自动转换过程中某些 `commit id` 和 Hash 可能被识别为数值类型的问题
|
||||||
|
- 合并 [#1](https://github.com/HighCapable/SweetProperty/pull/1) 并重新发布版本 (1.0.6)
|
||||||
|
- 修复由于 OSS 存储库被弃用导致重复提示检查更新的问题 (1.0.7)
|
@@ -39,4 +39,13 @@
|
|||||||
|
|
||||||
## 1.0.5 | 2023.11.08
|
## 1.0.5 | 2023.11.08
|
||||||
|
|
||||||
- Fix a serious issue that caused code generation failure when encountering special characters and duplicate key-value names
|
- Fix a serious issue that caused code generation failure when encountering special characters and duplicate key-value names
|
||||||
|
|
||||||
|
## 1.0.8 | 2025.08.19
|
||||||
|
|
||||||
|
- Fix errors when deploying source code paths in the new version of Android Gradle Plugin and Android Studio/IDEA
|
||||||
|
`removeContentEntry: removed content entry url 'build/generated/sweet-property' still exists after removing`
|
||||||
|
- Added the `sourceSetName` method to allow customization of the source set name to be deployed
|
||||||
|
- Fix an issue where some `commit id` and Hash might be recognized as numeric types during the automatic type conversion process
|
||||||
|
- Merge [#1](https://github.com/HighCapable/SweetProperty/pull/1) and re-release version (1.0.6)
|
||||||
|
- Fix a duplicate prompt for updates due to deprecating the OSS repository (1.0.7)
|
@@ -155,6 +155,10 @@ sweetProperty {
|
|||||||
// 默认为 "build/generated/sweet-property"
|
// 默认为 "build/generated/sweet-property"
|
||||||
// 建议将生成的代码放置于 "build" 目录下,因为生成的代码不建议去修改它
|
// 建议将生成的代码放置于 "build" 目录下,因为生成的代码不建议去修改它
|
||||||
generateDirPath = "build/generated/sweet-property"
|
generateDirPath = "build/generated/sweet-property"
|
||||||
|
// 自定义部署的 `sourceSet` 名称
|
||||||
|
// 如果你的项目源码部署名称不是默认值,可以在这里自定义
|
||||||
|
// 默认为 "main"
|
||||||
|
sourceSetName = "main"
|
||||||
// 自定义生成的包名
|
// 自定义生成的包名
|
||||||
// Android 项目默认使用 "android" 配置方法块中的 "namespace"
|
// Android 项目默认使用 "android" 配置方法块中的 "namespace"
|
||||||
// 普通的 Kotlin on Jvm 项目默认使用项目设置的 "project.group"
|
// 普通的 Kotlin on Jvm 项目默认使用项目设置的 "project.group"
|
||||||
|
@@ -168,6 +168,10 @@ sweetProperty {
|
|||||||
// It is recommended to place the generated code in the "build" directory,
|
// It is recommended to place the generated code in the "build" directory,
|
||||||
// because the generated code is not recommended to be modified
|
// because the generated code is not recommended to be modified
|
||||||
generateDirPath = "build/generated/sweet-property"
|
generateDirPath = "build/generated/sweet-property"
|
||||||
|
// Custom deployed `sourceSet` name
|
||||||
|
// If your project source code deployment name is not the default value, you can customize it here
|
||||||
|
// Defaults to "main"
|
||||||
|
sourceSetName = "main"
|
||||||
// Custom generated package name
|
// Custom generated package name
|
||||||
// Android projects use the "namespace" in the "android" configuration method block by default
|
// Android projects use the "namespace" in the "android" configuration method block by default
|
||||||
// Ordinary Kotlin on Jvm projects use the "project.group" of the project settings by default
|
// Ordinary Kotlin on Jvm projects use the "project.group" of the project settings by default
|
||||||
|
@@ -1,19 +1,27 @@
|
|||||||
# Project Configuration
|
# Project Configuration
|
||||||
project.name=SweetProperty
|
project.name=SweetProperty
|
||||||
project.description=An easy get project properties anywhere Gradle plugin.
|
|
||||||
project.url=https://github.com/HighCapable/SweetProperty
|
project.url=https://github.com/HighCapable/SweetProperty
|
||||||
project.groupName=com.highcapable.sweetproperty
|
project.groupName=com.highcapable.sweetproperty
|
||||||
project.moduleName=sweet-property
|
project.moduleName=sweet-property
|
||||||
project.version=1.0.5
|
project.version=1.0.8
|
||||||
project.licence.name=Apache License 2.0
|
|
||||||
project.licence.url=https://github.com/HighCapable/SweetProperty/blob/master/LICENSE
|
|
||||||
project.developer.id="0"
|
|
||||||
project.developer.name=fankes
|
|
||||||
project.developer.email=qzmmcn@163.com
|
|
||||||
# Gradle Plugin Configuration
|
# Gradle Plugin Configuration
|
||||||
gradle.plugin.moduleName=${project.groupName}.gradle.plugin
|
gradle.plugin.moduleName=${project.groupName}.gradle.plugin
|
||||||
gradle.plugin.implementationClass=${project.groupName}.plugin.SweetPropertyPlugin
|
gradle.plugin.implementationClass=${project.groupName}.plugin.SweetPropertyPlugin
|
||||||
# Maven Publish Configuration
|
# Maven Publish Configuration
|
||||||
maven.publish.scm.connection=scm:git:git://github.com/HighCapable/SweetProperty
|
SONATYPE_HOST=CENTRAL_PORTAL
|
||||||
maven.publish.scm.developerConnection=scm:git:ssh://github.com/HighCapable/SweetProperty
|
RELEASE_SIGNING_ENABLED=true
|
||||||
maven.publish.scm.url=https://github.com/HighCapable/SweetProperty
|
# Maven POM Configuration
|
||||||
|
POM_NAME=SweetProperty
|
||||||
|
POM_ARTIFACT_ID=sweet-property
|
||||||
|
POM_DESCRIPTION=An easy get project properties anywhere Gradle plugin.
|
||||||
|
POM_URL=https://github.com/HighCapable/SweetProperty
|
||||||
|
POM_LICENSE_NAME=Apache License 2.0
|
||||||
|
POM_LICENSE_URL=https://github.com/HighCapable/SweetProperty/blob/master/LICENSE
|
||||||
|
POM_LICENSE_DIST=repo
|
||||||
|
POM_SCM_URL=https://github.com/HighCapable/SweetProperty
|
||||||
|
POM_SCM_CONNECTION=scm:git:git://github.com/HighCapable/SweetProperty
|
||||||
|
POM_SCM_DEV_CONNECTION=scm:git:ssh://github.com/HighCapable/SweetProperty
|
||||||
|
POM_DEVELOPER_ID=0
|
||||||
|
POM_DEVELOPER_NAME=fankes
|
||||||
|
POM_DEVELOPER_EMAIL=qzmmcn@163.com
|
||||||
|
POM_DEVELOPER_URL=https://github.com/fankes
|
@@ -12,18 +12,18 @@ repositories:
|
|||||||
plugins:
|
plugins:
|
||||||
org.jetbrains.kotlin.jvm:
|
org.jetbrains.kotlin.jvm:
|
||||||
alias: kotlin-jvm
|
alias: kotlin-jvm
|
||||||
version: 1.9.20
|
version: 2.2.10
|
||||||
com.vanniktech.maven.publish:
|
com.vanniktech.maven.publish:
|
||||||
alias: maven-publish
|
alias: maven-publish
|
||||||
version: 0.25.3
|
version: 0.34.0
|
||||||
|
|
||||||
libraries:
|
libraries:
|
||||||
com.squareup.okhttp3:
|
com.squareup.okhttp3:
|
||||||
okhttp:
|
okhttp:
|
||||||
version: 4.12.0
|
version: 5.1.0
|
||||||
com.squareup:
|
com.squareup:
|
||||||
kotlinpoet:
|
kotlinpoet:
|
||||||
version: 1.14.2
|
version: 2.2.0
|
||||||
javapoet:
|
javapoet:
|
||||||
version: 1.13.0
|
version: 1.13.0
|
||||||
net.lingala.zip4j:
|
net.lingala.zip4j:
|
||||||
|
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,5 +1,5 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
@@ -7,8 +7,8 @@ pluginManagement {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
plugins {
|
plugins {
|
||||||
id("com.highcapable.sweetdependency") version "1.0.3"
|
id("com.highcapable.sweetdependency") version "1.0.4"
|
||||||
id("com.highcapable.sweetproperty") version "1.0.5"
|
id("com.highcapable.sweetproperty") version "1.0.8"
|
||||||
}
|
}
|
||||||
sweetDependency {
|
sweetDependency {
|
||||||
isEnableVerboseMode = false
|
isEnableVerboseMode = false
|
||||||
@@ -17,6 +17,10 @@ sweetProperty {
|
|||||||
global {
|
global {
|
||||||
sourcesCode {
|
sourcesCode {
|
||||||
className = rootProject.name
|
className = rootProject.name
|
||||||
|
includeKeys(
|
||||||
|
"^project\\..*\$".toRegex(),
|
||||||
|
"^gradle\\..*\$".toRegex()
|
||||||
|
)
|
||||||
isEnableRestrictedAccess = true
|
isEnableRestrictedAccess = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
2
sweetproperty-gradle-plugin/.gitignore
vendored
2
sweetproperty-gradle-plugin/.gitignore
vendored
@@ -1,2 +0,0 @@
|
|||||||
.gradle
|
|
||||||
build/
|
|
@@ -4,20 +4,25 @@ plugins {
|
|||||||
autowire(libs.plugins.maven.publish)
|
autowire(libs.plugins.maven.publish)
|
||||||
}
|
}
|
||||||
|
|
||||||
allprojects {
|
group = property.project.groupName
|
||||||
group = property.project.groupName
|
version = property.project.version
|
||||||
version = property.project.version
|
|
||||||
}
|
|
||||||
|
|
||||||
java {
|
java {
|
||||||
sourceCompatibility = JavaVersion.VERSION_17
|
sourceCompatibility = JavaVersion.VERSION_21
|
||||||
targetCompatibility = JavaVersion.VERSION_17
|
targetCompatibility = JavaVersion.VERSION_21
|
||||||
withSourcesJar()
|
withSourcesJar()
|
||||||
}
|
}
|
||||||
|
|
||||||
kotlin {
|
kotlin {
|
||||||
jvmToolchain(17)
|
jvmToolchain(21)
|
||||||
sourceSets.all { languageSettings { languageVersion = "2.0" } }
|
sourceSets.all { languageSettings { languageVersion = "2.0" } }
|
||||||
|
compilerOptions {
|
||||||
|
freeCompilerArgs = listOf(
|
||||||
|
"-Xno-param-assertions",
|
||||||
|
"-Xno-call-assertions",
|
||||||
|
"-Xno-receiver-assertions"
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
@@ -34,34 +39,4 @@ gradlePlugin {
|
|||||||
implementationClass = property.gradle.plugin.implementationClass
|
implementationClass = property.gradle.plugin.implementationClass
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
mavenPublishing {
|
|
||||||
coordinates(property.project.groupName, property.project.moduleName, property.project.version)
|
|
||||||
pom {
|
|
||||||
name = property.project.name
|
|
||||||
description = property.project.description
|
|
||||||
url = property.project.url
|
|
||||||
licenses {
|
|
||||||
license {
|
|
||||||
name = property.project.licence.name
|
|
||||||
url = property.project.licence.url
|
|
||||||
distribution = property.project.licence.url
|
|
||||||
}
|
|
||||||
}
|
|
||||||
developers {
|
|
||||||
developer {
|
|
||||||
id = property.project.developer.id
|
|
||||||
name = property.project.developer.name
|
|
||||||
email = property.project.developer.email
|
|
||||||
}
|
|
||||||
}
|
|
||||||
scm {
|
|
||||||
url = property.maven.publish.scm.url
|
|
||||||
connection = property.maven.publish.scm.connection
|
|
||||||
developerConnection = property.maven.publish.scm.developerConnection
|
|
||||||
}
|
|
||||||
}
|
|
||||||
publishToMavenCentral(com.vanniktech.maven.publish.SonatypeHost.S01)
|
|
||||||
signAllPublications()
|
|
||||||
}
|
}
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* SweetProperty - An easy get project properties anywhere Gradle plugin.
|
* SweetProperty - An easy get project properties anywhere Gradle plugin.
|
||||||
* Copyright (C) 2019-2023 HighCapable
|
* Copyright (C) 2019 HighCapable
|
||||||
* https://github.com/HighCapable/SweetProperty
|
* https://github.com/HighCapable/SweetProperty
|
||||||
*
|
*
|
||||||
* Apache License Version 2.0
|
* Apache License Version 2.0
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* SweetProperty - An easy get project properties anywhere Gradle plugin.
|
* SweetProperty - An easy get project properties anywhere Gradle plugin.
|
||||||
* Copyright (C) 2019-2023 HighCapable
|
* Copyright (C) 2019 HighCapable
|
||||||
* https://github.com/HighCapable/SweetProperty
|
* https://github.com/HighCapable/SweetProperty
|
||||||
*
|
*
|
||||||
* Apache License Version 2.0
|
* Apache License Version 2.0
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* SweetProperty - An easy get project properties anywhere Gradle plugin.
|
* SweetProperty - An easy get project properties anywhere Gradle plugin.
|
||||||
* Copyright (C) 2019-2023 HighCapable
|
* Copyright (C) 2019 HighCapable
|
||||||
* https://github.com/HighCapable/SweetProperty
|
* https://github.com/HighCapable/SweetProperty
|
||||||
*
|
*
|
||||||
* Apache License Version 2.0
|
* Apache License Version 2.0
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* SweetProperty - An easy get project properties anywhere Gradle plugin.
|
* SweetProperty - An easy get project properties anywhere Gradle plugin.
|
||||||
* Copyright (C) 2019-2023 HighCapable
|
* Copyright (C) 2019 HighCapable
|
||||||
* https://github.com/HighCapable/SweetProperty
|
* https://github.com/HighCapable/SweetProperty
|
||||||
*
|
*
|
||||||
* Apache License Version 2.0
|
* Apache License Version 2.0
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* SweetProperty - An easy get project properties anywhere Gradle plugin.
|
* SweetProperty - An easy get project properties anywhere Gradle plugin.
|
||||||
* Copyright (C) 2019-2023 HighCapable
|
* Copyright (C) 2019 HighCapable
|
||||||
* https://github.com/HighCapable/SweetProperty
|
* https://github.com/HighCapable/SweetProperty
|
||||||
*
|
*
|
||||||
* Apache License Version 2.0
|
* Apache License Version 2.0
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* SweetProperty - An easy get project properties anywhere Gradle plugin.
|
* SweetProperty - An easy get project properties anywhere Gradle plugin.
|
||||||
* Copyright (C) 2019-2023 HighCapable
|
* Copyright (C) 2019 HighCapable
|
||||||
* https://github.com/HighCapable/SweetProperty
|
* https://github.com/HighCapable/SweetProperty
|
||||||
*
|
*
|
||||||
* Apache License Version 2.0
|
* Apache License Version 2.0
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* SweetProperty - An easy get project properties anywhere Gradle plugin.
|
* SweetProperty - An easy get project properties anywhere Gradle plugin.
|
||||||
* Copyright (C) 2019-2023 HighCapable
|
* Copyright (C) 2019 HighCapable
|
||||||
* https://github.com/HighCapable/SweetProperty
|
* https://github.com/HighCapable/SweetProperty
|
||||||
*
|
*
|
||||||
* Apache License Version 2.0
|
* Apache License Version 2.0
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* SweetProperty - An easy get project properties anywhere Gradle plugin.
|
* SweetProperty - An easy get project properties anywhere Gradle plugin.
|
||||||
* Copyright (C) 2019-2023 HighCapable
|
* Copyright (C) 2019 HighCapable
|
||||||
* https://github.com/HighCapable/SweetProperty
|
* https://github.com/HighCapable/SweetProperty
|
||||||
*
|
*
|
||||||
* Apache License Version 2.0
|
* Apache License Version 2.0
|
||||||
@@ -56,6 +56,7 @@ internal object DefaultConfigs {
|
|||||||
) = object : ISweetPropertyConfigs.ISourcesCodeGenerateConfigs {
|
) = object : ISweetPropertyConfigs.ISourcesCodeGenerateConfigs {
|
||||||
override val name get() = name
|
override val name get() = name
|
||||||
override val generateDirPath get() = ISweetPropertyConfigs.DEFAULT_GENERATE_DIR_PATH
|
override val generateDirPath get() = ISweetPropertyConfigs.DEFAULT_GENERATE_DIR_PATH
|
||||||
|
override val sourceSetName get() = ISweetPropertyConfigs.DEFAULT_SOURCE_SET_NAME
|
||||||
override val packageName get() = ""
|
override val packageName get() = ""
|
||||||
override val className get() = ""
|
override val className get() = ""
|
||||||
override val isEnableRestrictedAccess get() = false
|
override val isEnableRestrictedAccess get() = false
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* SweetProperty - An easy get project properties anywhere Gradle plugin.
|
* SweetProperty - An easy get project properties anywhere Gradle plugin.
|
||||||
* Copyright (C) 2019-2023 HighCapable
|
* Copyright (C) 2019 HighCapable
|
||||||
* https://github.com/HighCapable/SweetProperty
|
* https://github.com/HighCapable/SweetProperty
|
||||||
*
|
*
|
||||||
* Apache License Version 2.0
|
* Apache License Version 2.0
|
||||||
@@ -74,6 +74,10 @@ private fun SweetPropertyConfigureExtension.SourcesCodeGenerateConfigureExtensio
|
|||||||
get() = this@create.generateDirPath.noBlank()
|
get() = this@create.generateDirPath.noBlank()
|
||||||
?: global?.generateDirPath?.noBlank()
|
?: global?.generateDirPath?.noBlank()
|
||||||
?: DefaultConfigs.sourcesCodeGenerateConfigs(name, selfBase, globalBase).generateDirPath
|
?: DefaultConfigs.sourcesCodeGenerateConfigs(name, selfBase, globalBase).generateDirPath
|
||||||
|
override val sourceSetName
|
||||||
|
get() = this@create.sourceSetName.noBlank()
|
||||||
|
?: global?.sourceSetName?.noBlank()
|
||||||
|
?: DefaultConfigs.sourcesCodeGenerateConfigs(name, selfBase, globalBase).sourceSetName
|
||||||
override val packageName
|
override val packageName
|
||||||
get() = this@create.packageName.noBlank()
|
get() = this@create.packageName.noBlank()
|
||||||
?: global?.packageName?.noBlank()
|
?: global?.packageName?.noBlank()
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* SweetProperty - An easy get project properties anywhere Gradle plugin.
|
* SweetProperty - An easy get project properties anywhere Gradle plugin.
|
||||||
* Copyright (C) 2019-2023 HighCapable
|
* Copyright (C) 2019 HighCapable
|
||||||
* https://github.com/HighCapable/SweetProperty
|
* https://github.com/HighCapable/SweetProperty
|
||||||
*
|
*
|
||||||
* Apache License Version 2.0
|
* Apache License Version 2.0
|
||||||
@@ -40,6 +40,11 @@ internal interface ISweetPropertyConfigs {
|
|||||||
*/
|
*/
|
||||||
internal const val DEFAULT_GENERATE_DIR_PATH = "build/generated/${SweetPropertyProperties.PROJECT_MODULE_NAME}"
|
internal const val DEFAULT_GENERATE_DIR_PATH = "build/generated/${SweetPropertyProperties.PROJECT_MODULE_NAME}"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 默认的部署 `sourceSet` 名称
|
||||||
|
*/
|
||||||
|
internal const val DEFAULT_SOURCE_SET_NAME = "main"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 默认的属性配置文件名称
|
* 默认的属性配置文件名称
|
||||||
*
|
*
|
||||||
@@ -91,6 +96,9 @@ internal interface ISweetPropertyConfigs {
|
|||||||
/** 自定义生成的目录路径 */
|
/** 自定义生成的目录路径 */
|
||||||
val generateDirPath: String
|
val generateDirPath: String
|
||||||
|
|
||||||
|
/** 自定义部署的 `sourceSet` 名称 */
|
||||||
|
val sourceSetName: String
|
||||||
|
|
||||||
/** 自定义生成的包名 */
|
/** 自定义生成的包名 */
|
||||||
val packageName: String
|
val packageName: String
|
||||||
|
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* SweetProperty - An easy get project properties anywhere Gradle plugin.
|
* SweetProperty - An easy get project properties anywhere Gradle plugin.
|
||||||
* Copyright (C) 2019-2023 HighCapable
|
* Copyright (C) 2019 HighCapable
|
||||||
* https://github.com/HighCapable/SweetProperty
|
* https://github.com/HighCapable/SweetProperty
|
||||||
*
|
*
|
||||||
* Apache License Version 2.0
|
* Apache License Version 2.0
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* SweetProperty - An easy get project properties anywhere Gradle plugin.
|
* SweetProperty - An easy get project properties anywhere Gradle plugin.
|
||||||
* Copyright (C) 2019-2023 HighCapable
|
* Copyright (C) 2019 HighCapable
|
||||||
* https://github.com/HighCapable/SweetProperty
|
* https://github.com/HighCapable/SweetProperty
|
||||||
*
|
*
|
||||||
* Apache License Version 2.0
|
* Apache License Version 2.0
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* SweetProperty - An easy get project properties anywhere Gradle plugin.
|
* SweetProperty - An easy get project properties anywhere Gradle plugin.
|
||||||
* Copyright (C) 2019-2023 HighCapable
|
* Copyright (C) 2019 HighCapable
|
||||||
* https://github.com/HighCapable/SweetProperty
|
* https://github.com/HighCapable/SweetProperty
|
||||||
*
|
*
|
||||||
* Apache License Version 2.0
|
* Apache License Version 2.0
|
||||||
@@ -173,6 +173,16 @@ open class SweetPropertyConfigureExtension internal constructor() {
|
|||||||
var generateDirPath = ""
|
var generateDirPath = ""
|
||||||
@JvmName("generateDirPath") set
|
@JvmName("generateDirPath") set
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 自定义部署的 `sourceSet` 名称
|
||||||
|
*
|
||||||
|
* 如果你的项目源码部署名称不是默认值 - 可以在这里自定义
|
||||||
|
*
|
||||||
|
* 默认为 [ISweetPropertyConfigs.DEFAULT_SOURCE_SET_NAME]
|
||||||
|
*/
|
||||||
|
var sourceSetName = ""
|
||||||
|
@JvmName("sourceSetName") set
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 自定义生成的包名
|
* 自定义生成的包名
|
||||||
*
|
*
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* SweetProperty - An easy get project properties anywhere Gradle plugin.
|
* SweetProperty - An easy get project properties anywhere Gradle plugin.
|
||||||
* Copyright (C) 2019-2023 HighCapable
|
* Copyright (C) 2019 HighCapable
|
||||||
* https://github.com/HighCapable/SweetProperty
|
* https://github.com/HighCapable/SweetProperty
|
||||||
*
|
*
|
||||||
* Apache License Version 2.0
|
* Apache License Version 2.0
|
||||||
@@ -203,11 +203,12 @@ internal class PropertiesAccessorsGenerator {
|
|||||||
addMethod(
|
addMethod(
|
||||||
MethodSpec.methodBuilder("get${getOrCreateUsedSuccessiveMethodName(methodName, className).capitalize()}").apply {
|
MethodSpec.methodBuilder("get${getOrCreateUsedSuccessiveMethodName(methodName, className).capitalize()}").apply {
|
||||||
val typedValue = value.parseTypedValue(configs.isEnableTypeAutoConversion)
|
val typedValue = value.parseTypedValue(configs.isEnableTypeAutoConversion)
|
||||||
addJavadoc("Resolve the \"$accessorsName\" value ${typedValue.second}")
|
val safeValueForJavadoc = typedValue.second.replace("$", "$$")
|
||||||
|
addJavadoc("Resolve the \"$accessorsName\" value $safeValueForJavadoc")
|
||||||
addModifiers(Modifier.PUBLIC, Modifier.FINAL)
|
addModifiers(Modifier.PUBLIC, Modifier.FINAL)
|
||||||
.addAnnotation(Nonnull::class.java)
|
.addAnnotation(Nonnull::class.java)
|
||||||
.returns(typedValue.first.java)
|
.returns(typedValue.first.java)
|
||||||
.addStatement("return ${typedValue.second}")
|
.addStatement("return $safeValueForJavadoc")
|
||||||
}.build()
|
}.build()
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* SweetProperty - An easy get project properties anywhere Gradle plugin.
|
* SweetProperty - An easy get project properties anywhere Gradle plugin.
|
||||||
* Copyright (C) 2019-2023 HighCapable
|
* Copyright (C) 2019 HighCapable
|
||||||
* https://github.com/HighCapable/SweetProperty
|
* https://github.com/HighCapable/SweetProperty
|
||||||
*
|
*
|
||||||
* Apache License Version 2.0
|
* Apache License Version 2.0
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* SweetProperty - An easy get project properties anywhere Gradle plugin.
|
* SweetProperty - An easy get project properties anywhere Gradle plugin.
|
||||||
* Copyright (C) 2019-2023 HighCapable
|
* Copyright (C) 2019 HighCapable
|
||||||
* https://github.com/HighCapable/SweetProperty
|
* https://github.com/HighCapable/SweetProperty
|
||||||
*
|
*
|
||||||
* Apache License Version 2.0
|
* Apache License Version 2.0
|
||||||
@@ -57,17 +57,21 @@ internal fun Any.parseTypedValue(isAutoConversion: Boolean): Pair<KClass<*>, Str
|
|||||||
} else it.replace("\"", "\\\"")
|
} else it.replace("\"", "\\\"")
|
||||||
}
|
}
|
||||||
if (!isAutoConversion) return Pair(String::class, "\"$valueString\"")
|
if (!isAutoConversion) return Pair(String::class, "\"$valueString\"")
|
||||||
|
val trimmed = valueString.trim()
|
||||||
val typeSpec = when {
|
val typeSpec = when {
|
||||||
isStringType -> String::class
|
isStringType || trimmed.any { !it.isDigit() && it != '.' && it != '-' } -> String::class
|
||||||
valueString.trim().toIntOrNull() != null -> Int::class
|
trimmed.toIntOrNull() != null -> Int::class
|
||||||
valueString.trim().toLongOrNull() != null -> Long::class
|
trimmed.toLongOrNull() != null -> Long::class
|
||||||
valueString.trim().toDoubleOrNull() != null -> Double::class
|
trimmed.toDoubleOrNull() != null -> Double::class
|
||||||
valueString.trim().toFloatOrNull() != null -> Float::class
|
trimmed.toFloatOrNull() != null -> Float::class
|
||||||
valueString.trim() == "true" || valueString.trim() == "false" -> Boolean::class
|
trimmed == "true" || trimmed == "false" -> Boolean::class
|
||||||
else -> String::class
|
else -> String::class
|
||||||
}; return Pair(typeSpec, if (typeSpec == String::class) "\"$valueString\"" else valueString.let {
|
}
|
||||||
if (typeSpec == Long::class && !it.endsWith("L")) "${it}L" else it
|
val finalValue = when (typeSpec) {
|
||||||
})
|
String::class -> "\"$valueString\""
|
||||||
|
Long::class -> if (trimmed.endsWith("L")) trimmed else "${trimmed}L"
|
||||||
|
else -> trimmed
|
||||||
|
}; return typeSpec to finalValue
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* SweetProperty - An easy get project properties anywhere Gradle plugin.
|
* SweetProperty - An easy get project properties anywhere Gradle plugin.
|
||||||
* Copyright (C) 2019-2023 HighCapable
|
* Copyright (C) 2019 HighCapable
|
||||||
* https://github.com/HighCapable/SweetProperty
|
* https://github.com/HighCapable/SweetProperty
|
||||||
*
|
*
|
||||||
* Apache License Version 2.0
|
* Apache License Version 2.0
|
||||||
@@ -35,8 +35,8 @@ import javax.xml.parsers.DocumentBuilderFactory
|
|||||||
*/
|
*/
|
||||||
internal object PluginUpdateHelper {
|
internal object PluginUpdateHelper {
|
||||||
|
|
||||||
/** OSS Release URL 地址 */
|
/** Maven Central Release URL 地址 */
|
||||||
private const val SONATYPE_OSS_RELEASES_URL = "https://s01.oss.sonatype.org/content/repositories/releases"
|
private const val SONATYPE_OSS_RELEASES_URL = "https://repo1.maven.org/maven2"
|
||||||
|
|
||||||
/** 依赖配置文件名 */
|
/** 依赖配置文件名 */
|
||||||
private const val METADATA_FILE_NAME = "maven-metadata.xml"
|
private const val METADATA_FILE_NAME = "maven-metadata.xml"
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* SweetProperty - An easy get project properties anywhere Gradle plugin.
|
* SweetProperty - An easy get project properties anywhere Gradle plugin.
|
||||||
* Copyright (C) 2019-2023 HighCapable
|
* Copyright (C) 2019 HighCapable
|
||||||
* https://github.com/HighCapable/SweetProperty
|
* https://github.com/HighCapable/SweetProperty
|
||||||
*
|
*
|
||||||
* Apache License Version 2.0
|
* Apache License Version 2.0
|
||||||
@@ -41,6 +41,7 @@ import com.highcapable.sweetproperty.utils.camelcase
|
|||||||
import com.highcapable.sweetproperty.utils.code.entity.MavenPomData
|
import com.highcapable.sweetproperty.utils.code.entity.MavenPomData
|
||||||
import com.highcapable.sweetproperty.utils.code.factory.compile
|
import com.highcapable.sweetproperty.utils.code.factory.compile
|
||||||
import com.highcapable.sweetproperty.utils.debug.SError
|
import com.highcapable.sweetproperty.utils.debug.SError
|
||||||
|
import com.highcapable.sweetproperty.utils.debug.SLog
|
||||||
import com.highcapable.sweetproperty.utils.flatted
|
import com.highcapable.sweetproperty.utils.flatted
|
||||||
import com.highcapable.sweetproperty.utils.hasInterpolation
|
import com.highcapable.sweetproperty.utils.hasInterpolation
|
||||||
import com.highcapable.sweetproperty.utils.isEmpty
|
import com.highcapable.sweetproperty.utils.isEmpty
|
||||||
@@ -49,7 +50,6 @@ import com.highcapable.sweetproperty.utils.noEmpty
|
|||||||
import com.highcapable.sweetproperty.utils.replaceInterpolation
|
import com.highcapable.sweetproperty.utils.replaceInterpolation
|
||||||
import com.highcapable.sweetproperty.utils.toStringMap
|
import com.highcapable.sweetproperty.utils.toStringMap
|
||||||
import com.highcapable.sweetproperty.utils.uppercamelcase
|
import com.highcapable.sweetproperty.utils.uppercamelcase
|
||||||
import org.gradle.api.DomainObjectCollection
|
|
||||||
import org.gradle.api.Project
|
import org.gradle.api.Project
|
||||||
import org.gradle.api.initialization.Settings
|
import org.gradle.api.initialization.Settings
|
||||||
import java.io.File
|
import java.io.File
|
||||||
@@ -212,6 +212,8 @@ internal object PropertiesDeployHelper {
|
|||||||
if (configs.isEnable) configureSourceSets(project = this)
|
if (configs.isEnable) configureSourceSets(project = this)
|
||||||
return
|
return
|
||||||
}; outputDir.apply { if (exists()) deleteRecursively() }
|
}; outputDir.apply { if (exists()) deleteRecursively() }
|
||||||
|
// 每次都会重新创建目录
|
||||||
|
outputDir.mkdirs()
|
||||||
cachedProjectProperties[fullName()] = properties
|
cachedProjectProperties[fullName()] = properties
|
||||||
val packageName = generatedPackageName(configs, project = this)
|
val packageName = generatedPackageName(configs, project = this)
|
||||||
val className = generatedClassName(configs, project = this)
|
val className = generatedClassName(configs, project = this)
|
||||||
@@ -227,16 +229,26 @@ internal object PropertiesDeployHelper {
|
|||||||
* @param project 当前项目
|
* @param project 当前项目
|
||||||
*/
|
*/
|
||||||
private fun configureSourceSets(project: Project) {
|
private fun configureSourceSets(project: Project) {
|
||||||
fun Project.deploySourceSets(name: String) = runCatching {
|
val configs = configs.with(project).sourcesCode
|
||||||
|
fun Project.deploySourceSet(name: String, sourceSetName: String = configs.sourceSetName) = runCatching {
|
||||||
val extension = get(name)
|
val extension = get(name)
|
||||||
val collection = extension.javaClass.getMethod("getSourceSets").invoke(extension) as DomainObjectCollection<*>
|
val collection = extension.javaClass.getMethod("getSourceSets").invoke(extension) as? Iterable<*>?
|
||||||
collection.configureEach {
|
val mainSet = collection?.firstOrNull {
|
||||||
val kotlin = javaClass.getMethod("getKotlin").invoke(this)
|
it?.javaClass?.getMethod("getName")?.invoke(it) == sourceSetName
|
||||||
kotlin.javaClass.getMethod("srcDir", Any::class.java).invoke(kotlin, configs.with(project).sourcesCode.generateDirPath)
|
} ?: return@runCatching SLog.warn("Could not found source set \"$sourceSetName\" for $name extension")
|
||||||
}
|
val kotlin = mainSet.javaClass.getMethod("getKotlin").invoke(mainSet)
|
||||||
|
val generateDir = configs.generateDirPath
|
||||||
|
val generateFile = File(generateDir)
|
||||||
|
// 确保目录存在
|
||||||
|
if (!generateFile.exists()) generateFile.mkdirs()
|
||||||
|
val srcDirs = kotlin.javaClass.getMethod("getSrcDirs").invoke(kotlin) as Set<*>
|
||||||
|
val alreadyAdded = srcDirs.any { it is File && it.canonicalPath == generateFile.canonicalPath }
|
||||||
|
if (!alreadyAdded) kotlin.javaClass.getMethod("srcDir", Any::class.java).invoke(kotlin, generateFile)
|
||||||
|
}.onFailure {
|
||||||
|
SLog.error(msg = "Failed to deploy source set \"$sourceSetName\" for $name extension\n${it.stackTraceToString()}")
|
||||||
}
|
}
|
||||||
if (project.hasExtension("kotlin")) project.deploySourceSets(name = "kotlin")
|
if (project.hasExtension("kotlin")) project.deploySourceSet(name = "kotlin")
|
||||||
if (project.hasExtension("android")) project.deploySourceSets(name = "android")
|
if (project.hasExtension("android")) project.deploySourceSet(name = "android")
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* SweetProperty - An easy get project properties anywhere Gradle plugin.
|
* SweetProperty - An easy get project properties anywhere Gradle plugin.
|
||||||
* Copyright (C) 2019-2023 HighCapable
|
* Copyright (C) 2019 HighCapable
|
||||||
* https://github.com/HighCapable/SweetProperty
|
* https://github.com/HighCapable/SweetProperty
|
||||||
*
|
*
|
||||||
* Apache License Version 2.0
|
* Apache License Version 2.0
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* SweetProperty - An easy get project properties anywhere Gradle plugin.
|
* SweetProperty - An easy get project properties anywhere Gradle plugin.
|
||||||
* Copyright (C) 2019-2023 HighCapable
|
* Copyright (C) 2019 HighCapable
|
||||||
* https://github.com/HighCapable/SweetProperty
|
* https://github.com/HighCapable/SweetProperty
|
||||||
*
|
*
|
||||||
* Apache License Version 2.0
|
* Apache License Version 2.0
|
||||||
@@ -52,7 +52,7 @@ internal fun String.executeUrlBody(username: String = "", password: String = "",
|
|||||||
else -> SError.make("Invalid URL: $this")
|
else -> SError.make("Invalid URL: $this")
|
||||||
}).get().build()
|
}).get().build()
|
||||||
).execute().let {
|
).execute().let {
|
||||||
if (it.code == 200 || it.code == 404) it.body?.string() ?: ""
|
if (it.code == 200 || it.code == 404) it.body.string()
|
||||||
else SError.make("Request failed with code ${it.code}")
|
else SError.make("Request failed with code ${it.code}")
|
||||||
}
|
}
|
||||||
}.onFailure { if (isShowFailure) SLog.error("Failed to connect to $this\n$it") }.getOrNull() ?: ""
|
}.onFailure { if (isShowFailure) SLog.error("Failed to connect to $this\n$it") }.getOrNull() ?: ""
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* SweetProperty - An easy get project properties anywhere Gradle plugin.
|
* SweetProperty - An easy get project properties anywhere Gradle plugin.
|
||||||
* Copyright (C) 2019-2023 HighCapable
|
* Copyright (C) 2019 HighCapable
|
||||||
* https://github.com/HighCapable/SweetProperty
|
* https://github.com/HighCapable/SweetProperty
|
||||||
*
|
*
|
||||||
* Apache License Version 2.0
|
* Apache License Version 2.0
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* SweetProperty - An easy get project properties anywhere Gradle plugin.
|
* SweetProperty - An easy get project properties anywhere Gradle plugin.
|
||||||
* Copyright (C) 2019-2023 HighCapable
|
* Copyright (C) 2019 HighCapable
|
||||||
* https://github.com/HighCapable/SweetProperty
|
* https://github.com/HighCapable/SweetProperty
|
||||||
*
|
*
|
||||||
* Apache License Version 2.0
|
* Apache License Version 2.0
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* SweetProperty - An easy get project properties anywhere Gradle plugin.
|
* SweetProperty - An easy get project properties anywhere Gradle plugin.
|
||||||
* Copyright (C) 2019-2023 HighCapable
|
* Copyright (C) 2019 HighCapable
|
||||||
* https://github.com/HighCapable/SweetProperty
|
* https://github.com/HighCapable/SweetProperty
|
||||||
*
|
*
|
||||||
* Apache License Version 2.0
|
* Apache License Version 2.0
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* SweetProperty - An easy get project properties anywhere Gradle plugin.
|
* SweetProperty - An easy get project properties anywhere Gradle plugin.
|
||||||
* Copyright (C) 2019-2023 HighCapable
|
* Copyright (C) 2019 HighCapable
|
||||||
* https://github.com/HighCapable/SweetProperty
|
* https://github.com/HighCapable/SweetProperty
|
||||||
*
|
*
|
||||||
* Apache License Version 2.0
|
* Apache License Version 2.0
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* SweetProperty - An easy get project properties anywhere Gradle plugin.
|
* SweetProperty - An easy get project properties anywhere Gradle plugin.
|
||||||
* Copyright (C) 2019-2023 HighCapable
|
* Copyright (C) 2019 HighCapable
|
||||||
* https://github.com/HighCapable/SweetProperty
|
* https://github.com/HighCapable/SweetProperty
|
||||||
*
|
*
|
||||||
* Apache License Version 2.0
|
* Apache License Version 2.0
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* SweetProperty - An easy get project properties anywhere Gradle plugin.
|
* SweetProperty - An easy get project properties anywhere Gradle plugin.
|
||||||
* Copyright (C) 2019-2023 HighCapable
|
* Copyright (C) 2019 HighCapable
|
||||||
* https://github.com/HighCapable/SweetProperty
|
* https://github.com/HighCapable/SweetProperty
|
||||||
*
|
*
|
||||||
* Apache License Version 2.0
|
* Apache License Version 2.0
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* SweetProperty - An easy get project properties anywhere Gradle plugin.
|
* SweetProperty - An easy get project properties anywhere Gradle plugin.
|
||||||
* Copyright (C) 2019-2023 HighCapable
|
* Copyright (C) 2019 HighCapable
|
||||||
* https://github.com/HighCapable/SweetProperty
|
* https://github.com/HighCapable/SweetProperty
|
||||||
*
|
*
|
||||||
* Apache License Version 2.0
|
* Apache License Version 2.0
|
||||||
|
Reference in New Issue
Block a user