chore: add in idea project files so there's a base for those using it

This commit is contained in:
Ryan Dowling 2021-07-31 11:38:40 +10:00
parent 317662afcc
commit b9a740850b
No known key found for this signature in database
GPG key ID: 5539FCDB88950EFD
14 changed files with 166 additions and 52 deletions

2
.gitignore vendored
View file

@ -8,8 +8,6 @@ dist/
run/
# IDE Config
.idea/
*.iml
.settings/
.classpath
.project

12
.idea/.gitignore vendored Normal file
View file

@ -0,0 +1,12 @@
# Default ignored files
/shelf/
/workspace.xml
# Custom ignored files
/libraries/
/modules/
/jarRepositories.xml
/misc.xml
/modules.xml
/runConfigurations.xml
/vcs.xml

12
.idea/ATLauncher.iml Normal file
View file

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<module external.linked.project.id="ATLauncher" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" external.system.module.group="com.atlauncher" external.system.module.version="3.4.6.1" type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/.gradle" />
<excludeFolder url="file://$MODULE_DIR$/build" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

6
.idea/compiler.xml Normal file
View file

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<bytecodeTargetLevel target="1.8" />
</component>
</project>

19
.idea/gradle.xml Normal file
View file

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GradleMigrationSettings" migrationVersion="1" />
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
<option name="distributionType" value="DEFAULT_WRAPPED" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="gradleJvm" value="#JAVA_HOME" />
<option name="modules">
<set>
<option value="$PROJECT_DIR$" />
<option value="$PROJECT_DIR$/app" />
</set>
</option>
</GradleProjectSettings>
</option>
</component>
</project>

View file

@ -0,0 +1,18 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Launch" type="Application" factoryName="Application">
<option name="MAIN_CLASS_NAME" value="com.atlauncher.App" />
<module name="ATLauncher.main" />
<option name="PROGRAM_PARAMETERS" value="--debug --debug-level 5 --disable-error-reporting --no-launcher-update" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/testLauncher" />
<extension name="coverage">
<pattern>
<option name="PATTERN" value="com.atlauncher.*" />
<option name="ENABLED" value="true" />
</pattern>
</extension>
<method v="2">
<option name="Make" enabled="true" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="createTestLauncherDir" externalProjectPath="$PROJECT_DIR$" vmOptions="" scriptParameters="" />
</method>
</configuration>
</component>

View file

@ -0,0 +1,18 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Launch (Dev)" type="Application" factoryName="Application">
<option name="MAIN_CLASS_NAME" value="com.atlauncher.App" />
<module name="ATLauncher.main" />
<option name="PROGRAM_PARAMETERS" value="--debug --debug-level 5 --disable-error-reporting --no-launcher-update --base-launcher-domain=https://atlauncher.test --base-cdn-domain=files.atlauncher.test --base-cdn-path=/ --allow-all-ssl-certs" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/testLauncher" />
<extension name="coverage">
<pattern>
<option name="PATTERN" value="com.atlauncher.*" />
<option name="ENABLED" value="true" />
</pattern>
</extension>
<method v="2">
<option name="Make" enabled="true" />
<option name="Gradle.BeforeRunTask" enabled="true" tasks="createTestLauncherDir" externalProjectPath="$PROJECT_DIR$" vmOptions="" scriptParameters="" />
</method>
</configuration>
</component>

View file

@ -0,0 +1,21 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="UI Tests" type="GradleRunConfiguration" factoryName="Gradle">
<ExternalSystemSettings>
<option name="executionName" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="externalSystemIdString" value="GRADLE" />
<option name="scriptParameters" value=":test --tests ui.*" />
<option name="taskDescriptions">
<list />
</option>
<option name="taskNames">
<list />
</option>
<option name="vmOptions" />
</ExternalSystemSettings>
<ExternalSystemDebugServerProcess>false</ExternalSystemDebugServerProcess>
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
<DebugAllEnabled>false</DebugAllEnabled>
<method v="2" />
</configuration>
</component>

View file

@ -0,0 +1,21 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Unit Tests" type="GradleRunConfiguration" factoryName="Gradle">
<ExternalSystemSettings>
<option name="executionName" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="externalSystemIdString" value="GRADLE" />
<option name="scriptParameters" value=":test --tests com.atlauncher.*" />
<option name="taskDescriptions">
<list />
</option>
<option name="taskNames">
<list />
</option>
<option name="vmOptions" />
</ExternalSystemSettings>
<ExternalSystemDebugServerProcess>false</ExternalSystemDebugServerProcess>
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
<DebugAllEnabled>false</DebugAllEnabled>
<method v="2" />
</configuration>
</component>

5
.vscode/launch.json vendored
View file

@ -8,9 +8,8 @@
"mainClass": "com.atlauncher.App",
"projectName": "ATLauncher",
"cwd": "${workspaceFolder}/testLauncher",
"preLaunchTask": "makeTestLauncherDirectory",
"preLaunchTask": "createTestLauncherDir",
"args": "--debug --debug-level 5 --disable-error-reporting --no-launcher-update",
},
{
"type": "java",
@ -19,7 +18,7 @@
"mainClass": "com.atlauncher.App",
"projectName": "ATLauncher",
"cwd": "${workspaceFolder}/testLauncher/dev",
"preLaunchTask": "makeTestLauncherDevDirectory",
"preLaunchTask": "createTestLauncherDir",
"args": "--debug --debug-level 5 --disable-error-reporting --no-launcher-update --base-launcher-domain=https://atlauncher.test --base-cdn-domain=files.atlauncher.test --base-cdn-path=/ --allow-all-ssl-certs"
}
]

34
.vscode/tasks.json vendored
View file

@ -15,6 +15,12 @@
"isDefault": true
}
},
{
"label": "createTestLauncherDir",
"type": "shell",
"command": "./gradlew createTestLauncherDir",
"problemMatcher": []
},
{
"label": "generateTemplatePot",
"type": "shell",
@ -41,34 +47,6 @@
"kind": "test",
"isDefault": true
}
},
{
"label": "makeTestLauncherDirectory",
"type": "shell",
"linux": {
"command": "mkdir -p ./testLauncher"
},
"windows": {
"command": "cmd",
"args": [
"/C",
"if not exist .\\testLauncher mkdir .\\testLauncher"
]
}
},
{
"label": "makeTestLauncherDevDirectory",
"type": "shell",
"linux": {
"command": "mkdir -p ./testLauncher/dev"
},
"windows": {
"command": "cmd",
"args": [
"/C",
"if not exist .\\testLauncher\\dev mkdir .\\testLauncher\\dev"
]
}
}
]
}

View file

@ -13,3 +13,4 @@ This changelog only contains the changes that are unreleased. For changes for in
- Issue with 64 bit OS not using correct runtime when using 32 bit Java
### Misc
- Add in idea project files so there's a base for those using it

View file

@ -10,11 +10,11 @@ modpacks easily and quickly.
## Links
- [ATLauncher Website](https://atlauncher.com)
- [ATLauncher Discord](https://atl.pw/discord)
- [ATLauncher Facebook](https://www.facebook.com/ATLauncher)
- [ATLauncher Reddit](https://www.reddit.com/r/ATLauncher)
- [ATLauncher Twitter](https://twitter.com/ATLauncher)
- [ATLauncher Website](https://atlauncher.com)
- [ATLauncher Discord](https://atl.pw/discord)
- [ATLauncher Facebook](https://www.facebook.com/ATLauncher)
- [ATLauncher Reddit](https://www.reddit.com/r/ATLauncher)
- [ATLauncher Twitter](https://twitter.com/ATLauncher)
## Contributing to ATLauncher
@ -52,11 +52,18 @@ Alternatively you can run:
./gradlew run --args="--debug --debug-level 3 --working-dir=testLauncher"
```
## Using VSCode
Setting the `--working-dir=testLauncher` argument is necessary as it will ensure that the launchers files are not
spewed in the root directory and are instead contained within a gitignored folder.
This project is setup to use [VSCode](https://code.visualstudio.com/) for development. You're free to use any other IDE
that you're accustomed to (if any), but by using VSCode, you get the benefit of predefined tasks and launch commands as
well as a list of extensions recommended for the project.
## Using an IDE
This project is mainly setup and developed to use [VSCode](https://code.visualstudio.com/) for development. You're free
to use any other IDE that you're accustomed to (if any), but by using VSCode, you get the benefit of predefined tasks
and launch commands as well as a list of extensions recommended for the project.
We also provide some base project files for [IntelliJ IDEA](https://www.jetbrains.com/idea/) so that if you use that,
you should get access to our base project files which contain correct launch tasks for testing the application as well
as tasks for running the UI/Unit tests.
## Checking for dependency updates
@ -92,10 +99,10 @@ ATLauncher supports custom themes. The process is fairly straight forward, but m
First you must create a `MyThemeName.java` in the `src/main/java/com/atlauncher/themes/` directory. Your theme should
extend one of the base ATLauncher themes depending on what you need:
- `Dark` is the default theme and is a dark theme. It's a good place to start with some defaults for new dark themes.
- `Light` is a light theme. It's a good place to start with some defaults for new light themes.
- `ATLauncherLaf` is a base class which every theme MUST at some point extend. It provides some defaults including our
brand colours and some defaults. This shouldn't be extended from unless you need absolute power.
- `Dark` is the default theme and is a dark theme. It's a good place to start with some defaults for new dark themes.
- `Light` is a light theme. It's a good place to start with some defaults for new light themes.
- `ATLauncherLaf` is a base class which every theme MUST at some point extend. It provides some defaults including our
brand colours and some defaults. This shouldn't be extended from unless you need absolute power.
Once you've created your class (look at other themes in the directory for an idea on what you can do), you'll need to
create a properties file in the `src/main/resources/com/atlauncher/themes/` directory. This properties file is how you
@ -108,12 +115,12 @@ Now you can open the launcher and then switch to your theme.
We use a library called [FlatLaf](https://github.com/JFormDesigner/FlatLaf) to provide theme support. There are some
good references listed below to see the default values for the themes and see what you can overwrite:
- <https://github.com/JFormDesigner/FlatLaf/blob/master/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLaf.properties>
- This file contains all the base properties for all themes
- <https://github.com/JFormDesigner/FlatLaf/blob/master/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLightLaf.properties>
- This file contains all the base properties for light themes
- <https://github.com/JFormDesigner/FlatLaf/blob/master/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatDarkLaf.properties>
- This file contains all the base properties for dark themes
- <https://github.com/JFormDesigner/FlatLaf/blob/master/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLaf.properties>
- This file contains all the base properties for all themes
- <https://github.com/JFormDesigner/FlatLaf/blob/master/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLightLaf.properties>
- This file contains all the base properties for light themes
- <https://github.com/JFormDesigner/FlatLaf/blob/master/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatDarkLaf.properties>
- This file contains all the base properties for dark themes
### IntelliJ theme.json Support

View file

@ -218,6 +218,10 @@ task downloadNewerUniversalJavaApplicationStub(type: Download) {
overwrite true
}
task createTestLauncherDir {
project.file('testLauncher/dev').mkdirs()
}
task createMacApp(type: Zip) {
dependsOn createApp, shadowJar
from("$buildDir/macApp") {