Merge branch 'refactor/maven' into feature/mirror2

This commit is contained in:
Bane Stojkovic
2025-03-17 22:53:03 +01:00
25 changed files with 192 additions and 146 deletions
+147 -15
View File
@@ -1,17 +1,149 @@
# Eclipse # Reference: https://github.com/github/gitignore
.classpath # From: https://gist.github.com/edesdan/6bb43343740bcd54ef0f56a384a2f66f
.project
.settings/ ######################
###### Mac OS X ######
# Intellij ######################
.idea/
*.iml # Folder view configuration files
*.iws
# Mac
.DS_Store .DS_Store
Desktop.ini
# Maven
**/log/ # Thumbnail cache files
._*
Thumbs.db
# Files that might appear on external disks
.Spotlight-V100
.Trashes
######################
###### Java ######
######################
# Compiled class file
*.class
# Log file
*.log
# BlueJ files
*.ctxt
# Mobile Tools for Java (J2ME)
.mtj.tmp/
# Package Files #
*.jar
*.war
*.ear
*.zip
*.tar.gz
*.rar
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
######################
###### Gradle ######
######################
.gradle
build/
# Ignore Gradle GUI config
gradle-app.setting
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
!gradle-wrapper.jar
# Cache of project
.gradletasknamecache
# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898
# gradle/wrapper/gradle-wrapper.properties
######################
###### Intellij ######
######################
# Created by https://www.gitignore.io/api/intellij
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
# User-specific stuff:
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/dictionaries
# Sensitive or high-churn files:
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.xml
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
# Gradle:
.idea/**/gradle.xml
.idea/**/libraries
# CMake
cmake-build-debug/
# Mongo Explorer plugin:
.idea/**/mongoSettings.xml
## File-based project format:
*.iws
## Plugin-specific files:
# IntelliJ
/out/
# mpeltonen/sbt-idea plugin
.idea_modules/
# JIRA plugin
atlassian-ide-plugin.xml
# Cursive Clojure plugin
.idea/replstate.xml
# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties
### Intellij Patch ###
# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721
# *.iml
# modules.xml
# .idea/misc.xml
# *.ipr
# Sonarlint plugin
.idea/sonarlint
# End of https://www.gitignore.io/api/intellij
######################
###### Maven ######
######################
**/target/ **/target/
**/build/ pom.xml.tag
pom.xml.releaseBackup
pom.xml.versionsBackup
pom.xml.next
release.properties
dependency-reduced-pom.xml
buildNumber.properties
.mvn/timing.properties
# Avoid ignoring Maven wrapper jar file (.jar files are usually ignored)
!/.mvn/wrapper/maven-wrapper.jar
+6
View File
@@ -75,16 +75,22 @@
<groupId>org.diylc.local</groupId> <groupId>org.diylc.local</groupId>
<artifactId>app-framework</artifactId> <artifactId>app-framework</artifactId>
<version>1.0</version> <version>1.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/../lib/app-framework.jar</systemPath>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.diylc.local</groupId> <groupId>org.diylc.local</groupId>
<artifactId>gerber-writer-api-1.0.0</artifactId> <artifactId>gerber-writer-api-1.0.0</artifactId>
<version>1.0</version> <version>1.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/../lib/gerber-writer-api-1.0.0.jar</systemPath>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.diylc.local</groupId> <groupId>org.diylc.local</groupId>
<artifactId>java-http-proxy</artifactId> <artifactId>java-http-proxy</artifactId>
<version>1.0</version> <version>1.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/../lib/java-http-proxy.jar</systemPath>
</dependency> </dependency>
</dependencies> </dependencies>
</project> </project>
@@ -1569,8 +1569,8 @@ public class Presenter implements IPlugInPort, IConfigListener {
double centerY = (maxY + minY) / 2; double centerY = (maxY + minY) / 2;
if (snapToGrid) { if (snapToGrid) {
CalcUtils.roundToGrid(centerX, this.currentProject.getGridSpacing()); centerX = CalcUtils.roundToGrid(centerX, this.currentProject.getGridSpacing());
CalcUtils.roundToGrid(centerY, this.currentProject.getGridSpacing()); centerY = CalcUtils.roundToGrid(centerY, this.currentProject.getGridSpacing());
} }
return new Point2D.Double(centerX, centerY); return new Point2D.Double(centerX, centerY);
@@ -265,10 +265,18 @@
<changeType>IMPROVEMENT</changeType> <changeType>IMPROVEMENT</changeType>
<description>Improved robustness of series/parallel graph construction code used in circuit analysis</description> <description>Improved robustness of series/parallel graph construction code used in circuit analysis</description>
</org.diylc.appframework.update.Change> </org.diylc.appframework.update.Change>
<org.diylc.appframework.update.Change>
<changeType>IMPROVEMENT</changeType>
<description>Omit boards, wires, traces, terminals, etc from Spice netlist output</description>
</org.diylc.appframework.update.Change>
<org.diylc.appframework.update.Change> <org.diylc.appframework.update.Change>
<changeType>BUG_FIX</changeType> <changeType>BUG_FIX</changeType>
<description>Moving selected components with a mouse doesn't register file modification action and doesn't enable Undo action</description> <description>Moving selected components with a mouse doesn't register file modification action and doesn't enable Undo action</description>
</org.diylc.appframework.update.Change> </org.diylc.appframework.update.Change>
<org.diylc.appframework.update.Change>
<changeType>BUG_FIX</changeType>
<description>Rotating selected components sometimes wacks the alignment off the grid</description>
</org.diylc.appframework.update.Change>
</changes> </changes>
<url>https://github.com/bancika/diy-layout-creator/releases</url> <url>https://github.com/bancika/diy-layout-creator/releases</url>
</org.diylc.appframework.update.Version> </org.diylc.appframework.update.Version>
Binary file not shown.
Binary file not shown.
+9 -1
View File
@@ -51,7 +51,7 @@
<dependency> <dependency>
<groupId>org.apache.poi</groupId> <groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId> <artifactId>poi</artifactId>
<version>3.5-FINAL</version> <version>5.4.0</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>junit</groupId> <groupId>junit</groupId>
@@ -64,21 +64,29 @@
<groupId>org.diylc.local</groupId> <groupId>org.diylc.local</groupId>
<artifactId>app-framework</artifactId> <artifactId>app-framework</artifactId>
<version>1.0</version> <version>1.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/../lib/app-framework.jar</systemPath>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.diylc.local</groupId> <groupId>org.diylc.local</groupId>
<artifactId>gerber-writer-api-1.0.0</artifactId> <artifactId>gerber-writer-api-1.0.0</artifactId>
<version>1.0</version> <version>1.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/../lib/gerber-writer-api-1.0.0.jar</systemPath>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.diylc.local</groupId> <groupId>org.diylc.local</groupId>
<artifactId>jep-2.4.1</artifactId> <artifactId>jep-2.4.1</artifactId>
<version>1.0</version> <version>1.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/../lib/jep-2.4.1.jar</systemPath>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.diylc.local</groupId> <groupId>org.diylc.local</groupId>
<artifactId>svgSalamander-1.1.2.4</artifactId> <artifactId>svgSalamander-1.1.2.4</artifactId>
<version>1.0</version> <version>1.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/../lib/svgSalamander-1.1.2.4.jar</systemPath>
</dependency> </dependency>
</dependencies> </dependencies>
</project> </project>
@@ -61,9 +61,14 @@ public class SpiceAnalyzer extends NetlistAnalyzer implements INetlistAnalyzer {
protected Summary summarize(Netlist netlist, Node preferredOutput) throws TreeException { protected Summary summarize(Netlist netlist, Node preferredOutput) throws TreeException {
// grab all components that are in the netlist // grab all components that are in the netlist
List<IDIYComponent<?>> allComponents = netlist.getComponents();
List<Group> groups = netlist.getSortedGroups(); List<Group> groups = netlist.getSortedGroups();
List<IDIYComponent<?>> allComponents = groups.stream()
.flatMap(x -> x.getNodes().stream()
.map(y -> y.getComponent()))
.distinct()
.collect(Collectors.toList());
int unconnectedIndex = groups.size(); int unconnectedIndex = groups.size();
int maxLen = 0; int maxLen = 0;
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+13 -1
View File
@@ -65,7 +65,7 @@
<dependency> <dependency>
<groupId>org.apache.poi</groupId> <groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId> <artifactId>poi</artifactId>
<version>3.5-FINAL</version> <version>5.4.0</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.google.guava</groupId> <groupId>com.google.guava</groupId>
@@ -118,31 +118,43 @@
<groupId>org.diylc.local</groupId> <groupId>org.diylc.local</groupId>
<artifactId>app-framework</artifactId> <artifactId>app-framework</artifactId>
<version>1.0</version> <version>1.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/../lib/app-framework.jar</systemPath>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.diylc.local</groupId> <groupId>org.diylc.local</groupId>
<artifactId>gerber-writer-api-1.0.0</artifactId> <artifactId>gerber-writer-api-1.0.0</artifactId>
<version>1.0</version> <version>1.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/../lib/gerber-writer-api-1.0.0.jar</systemPath>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.diylc.local</groupId> <groupId>org.diylc.local</groupId>
<artifactId>java-http-proxy</artifactId> <artifactId>java-http-proxy</artifactId>
<version>1.0</version> <version>1.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/../lib/java-http-proxy.jar</systemPath>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.diylc.local</groupId> <groupId>org.diylc.local</groupId>
<artifactId>jep-2.4.1</artifactId> <artifactId>jep-2.4.1</artifactId>
<version>1.0</version> <version>1.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/../lib/jep-2.4.1.jar</systemPath>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.diylc.local</groupId> <groupId>org.diylc.local</groupId>
<artifactId>svgSalamander-1.1.2.4</artifactId> <artifactId>svgSalamander-1.1.2.4</artifactId>
<version>1.0</version> <version>1.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/../lib/svgSalamander-1.1.2.4.jar</systemPath>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.diylc.local</groupId> <groupId>org.diylc.local</groupId>
<artifactId>swing-framework</artifactId> <artifactId>swing-framework</artifactId>
<version>1.0</version> <version>1.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/../lib/swing-framework.jar</systemPath>
</dependency> </dependency>
</dependencies> </dependencies>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

-63
View File
@@ -1,63 +0,0 @@
@echo off
setlocal enabledelayedexpansion
echo ===================================================
echo DIYLC Maven Local Dependency Installer for Windows
echo ===================================================
echo.
echo This script will install all JAR files from the lib directories
echo to your local Maven repository.
echo.
REM Define the group ID for all local dependencies
set GROUP_ID=org.diylc.local
REM List of module lib directories to process
set MODULES=diylc-swing
echo Processing dependencies...
echo.
for %%m in (%MODULES%) do (
echo Module: %%m
echo -----------------------
if exist "%%m\lib" (
for %%j in ("%%m\lib\*.jar") do (
REM Extract filename without extension
set "JAR_FILE=%%j"
set "ARTIFACT_ID=%%~nj"
echo Installing !ARTIFACT_ID!.jar
REM Install the JAR to the local Maven repository
call mvn install:install-file ^
-Dfile="!JAR_FILE!" ^
-DgroupId=%GROUP_ID% ^
-DartifactId=!ARTIFACT_ID! ^
-Dversion=1.0 ^
-Dpackaging=jar ^
-DgeneratePom=true ^
-DcreateChecksum=true
echo.
)
) else (
echo No lib directory found for %%m
echo.
)
)
echo ===================================================
echo All dependencies have been installed!
echo.
echo You can now reference these dependencies in your POM files as:
echo.
echo ^<dependency^>
echo ^<groupId^>%GROUP_ID%^</groupId^>
echo ^<artifactId^>ARTIFACT_NAME^</artifactId^>
echo ^<version^>1.0^</version^>
echo ^</dependency^>
echo ===================================================
pause
-62
View File
@@ -1,62 +0,0 @@
#!/bin/bash
echo "==================================================="
echo "DIYLC Maven Local Dependency Installer for Unix"
echo "==================================================="
echo
echo "This script will install all JAR files from the lib directories"
echo "to your local Maven repository."
echo
# Define the group ID for all local dependencies
GROUP_ID="org.diylc.local"
# List of module lib directories to process
MODULES=("diylc-swing")
echo "Processing dependencies..."
echo
for module in "${MODULES[@]}"; do
echo "Module: $module"
echo "-----------------------"
if [ -d "$module/lib" ]; then
for jar_file in "$module/lib"/*.jar; do
# Skip if no jar files found
[ -e "$jar_file" ] || continue
# Extract filename without extension
ARTIFACT_ID=$(basename "$jar_file" .jar)
echo "Installing $ARTIFACT_ID.jar"
# Install the JAR to the local Maven repository
mvn install:install-file \
-Dfile="$jar_file" \
-DgroupId="$GROUP_ID" \
-DartifactId="$ARTIFACT_ID" \
-Dversion=1.0 \
-Dpackaging=jar \
-DgeneratePom=true \
-DcreateChecksum=true
echo
done
else
echo "No lib directory found for $module"
echo
fi
done
echo "==================================================="
echo "All dependencies have been installed!"
echo
echo "You can now reference these dependencies in your POM files as:"
echo
echo "<dependency>"
echo " <groupId>$GROUP_ID</groupId>"
echo " <artifactId>ARTIFACT_NAME</artifactId>"
echo " <version>1.0</version>"
echo "</dependency>"
echo "==================================================="
Binary file not shown.