Update project structure

This commit is contained in:
Guilherme Werner
2023-06-18 17:06:23 -03:00
parent e360815344
commit 3526246e1d
18 changed files with 60 additions and 164 deletions

6
.idea/compiler.xml generated
View File

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

17
.idea/gradle.xml generated
View File

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

View File

@ -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>

5
.idea/misc.xml generated
View File

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="17" project-jdk-type="JavaSDK" />
</project>

7
.idea/vcs.xml generated
View File

@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

86
.idea/workspace.xml generated
View File

@ -1,86 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="AutoImportSettings">
<option name="autoReloadType" value="SELECTIVE" />
</component>
<component name="ChangeListManager">
<list default="true" id="bc538ff5-b863-4ae4-a53d-584125c89699" name="Changes" comment="" />
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="ExternalProjectsData">
<projectState path="$PROJECT_DIR$">
<ProjectState />
</projectState>
</component>
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component>
<component name="MarkdownSettingsMigration">
<option name="stateVersion" value="1" />
</component>
<component name="ProjectId" id="2RChnd9JZwVYt84xZ9ghrX4wOh5" />
<component name="ProjectViewState">
<option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" />
</component>
<component name="PropertiesComponent">{
&quot;keyToString&quot;: {
&quot;RunOnceActivity.OpenProjectViewOnStart&quot;: &quot;true&quot;,
&quot;RunOnceActivity.ShowReadmeOnStart&quot;: &quot;true&quot;,
&quot;last_opened_file_path&quot;: &quot;C:/Projects/Redes&quot;,
&quot;project.structure.last.edited&quot;: &quot;Modules&quot;,
&quot;project.structure.proportion&quot;: &quot;0.0&quot;,
&quot;project.structure.side.proportion&quot;: &quot;0.0&quot;
}
}</component>
<component name="RunManager" selected="Application.Client 2">
<configuration name="Client 1" type="Application" factoryName="Application">
<option name="ALTERNATIVE_JRE_PATH" value="17" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="true" />
<option name="MAIN_CLASS_NAME" value="org.example.ClientApp" />
<module name="redes.main" />
<option name="PROGRAM_PARAMETERS" value="Afonso" />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
<configuration name="Client 2" type="Application" factoryName="Application">
<option name="ALTERNATIVE_JRE_PATH" value="17" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="true" />
<option name="MAIN_CLASS_NAME" value="org.example.ClientApp" />
<module name="redes.main" />
<option name="PROGRAM_PARAMETERS" value="Joaquina" />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
<configuration name="Server" type="Application" factoryName="Application">
<option name="ALTERNATIVE_JRE_PATH" value="17" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="true" />
<option name="MAIN_CLASS_NAME" value="org.example.ServerApp" />
<module name="redes.main" />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
<list>
<item itemvalue="Application.Server" />
<item itemvalue="Application.Client 1" />
<item itemvalue="Application.Client 2" />
</list>
</component>
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="bc538ff5-b863-4ae4-a53d-584125c89699" name="Changes" comment="" />
<created>1686760140487</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1686760140487</updated>
</task>
<servers />
</component>
</project>

View File

@ -1,19 +0,0 @@
plugins {
id 'java'
}
group = 'org.example'
version = '1.0-SNAPSHOT'
repositories {
mavenCentral()
}
dependencies {
testImplementation platform('org.junit:junit-bom:5.9.1')
testImplementation 'org.junit.jupiter:junit-jupiter'
}
test {
useJUnitPlatform()
}

18
client/build.gradle Normal file
View File

@ -0,0 +1,18 @@
plugins {
id 'application'
}
repositories {
mavenCentral()
}
dependencies {
testImplementation 'junit:junit:4.13.1'
implementation 'com.google.guava:guava:30.0-jre'
}
tasks.named("jar") {
manifest {
attributes("Implementation-Title": rootProject.name, "Implementation-Version": project.version, "Main-Class": "com.example.redes.ClientApp")
}
}

View File

@ -1,4 +1,4 @@
package org.example; package com.example.redes;
import javax.swing.*; import javax.swing.*;
import java.awt.*; import java.awt.*;
@ -13,7 +13,7 @@ import java.net.DatagramSocket;
import java.net.Socket; import java.net.Socket;
public class ClientApp extends JFrame { public class ClientApp extends JFrame {
private static final String SERVER_IP = "localhost"; private static final String SERVER_IP = "172.16.0.1";
private static final int SERVER_TCP_PORT = 5475; private static final int SERVER_TCP_PORT = 5475;
private static final int SERVER_UDP_PORT = 5565; private static final int SERVER_UDP_PORT = 5565;

3
scripts/build.ps1 Normal file
View File

@ -0,0 +1,3 @@
#!/usr/bin/pwsh
.\gradlew jar

3
scripts/client1.bat Normal file
View File

@ -0,0 +1,3 @@
@echo off
java -jar .\client\build\libs\client.jar Afonso

3
scripts/client2.bat Normal file
View File

@ -0,0 +1,3 @@
@echo off
java -jar .\client\build\libs\client.jar Afonso

3
scripts/client3.bat Normal file
View File

@ -0,0 +1,3 @@
@echo off
java -jar .\client\build\libs\client.jar Afonso

3
scripts/client4.bat Normal file
View File

@ -0,0 +1,3 @@
@echo off
java -jar .\client\build\libs\client.jar Afonso

3
scripts/server.bat Normal file
View File

@ -0,0 +1,3 @@
@echo off
java -jar .\server\build\libs\server.jar

18
server/build.gradle Normal file
View File

@ -0,0 +1,18 @@
plugins {
id 'application'
}
repositories {
mavenCentral()
}
dependencies {
testImplementation 'junit:junit:4.13.1'
implementation 'com.google.guava:guava:30.0-jre'
}
tasks.named("jar") {
manifest {
attributes("Implementation-Title": rootProject.name, "Implementation-Version": project.version, "Main-Class": "com.example.redes.ServerApp")
}
}

View File

@ -1,4 +1,4 @@
package org.example; package com.example.redes;
import java.io.BufferedReader; import java.io.BufferedReader;
import java.io.IOException; import java.io.IOException;

View File

@ -1 +1,3 @@
rootProject.name = 'redes' rootProject.name = 'Redes'
include('client')
include('server')