Léa Raya DÉCORNOD <lea-raya.decornod@unistra.fr>
une structure de données
stdio.h
…
#include <bits/types/FILE.h>
#include &li;bits/types/struct_FILE.h>
…
FILE.h
…
typedef struct _IO_FILE FILE;
…
struct_FILE.h
struct _IO_FILE {
int _flags;
…
int _fileno;
…
_IO_lock_t *_lock;
};
des fonctions associées
stdio.h
/* Open a file and create
a new stream for it. */
extern
FILE *fopen (const char *__filename,
const char *__modes);
/* Write formatted output to STREAM. */
extern
int fprintf (FILE *__stream,
const char *__format,
...);
/* Close STREAM. */
extern
int fclose (FILE *__stream);
FILE* truc;
sont associés aux fonctions f…(truc, …);
un peu partout dans le code source,
en particulier fopen()
&
fclose()
.
struct _IO_FILE {…
?)
malloc
,
free
,
*
,
&
, etc.
if
,switch
,
union
, etc.
int
,long
,float
,double
,char
boolean
(true
/false
)*
, &
, etc.pointeur->suivant->suivant
reference.suivant.suivant
malloc(taille)
new Type
,free(…)
String
remplace les char
terminés par '\0'
struct
class
class
class
est rangée dans.java
de même nom#include <math.h>
import java.lang.Math;
import java.lang.*;
est par défautprintf("m=%f\n",m);
System.out.println("m="+m);
digraph PlaformeJava { bgcolor=transparent id="\G" node [ id="\G-\N" ] edge [ id="\G-\E" ] { rank = same Dev [ label=<👩
🖮>, fontname="Symbola", fontsize=32, fontcolor=blue3, shape=plaintext ] Class1 [ label=<Classe1.class
byte-code
���␀4;↲"#⇥$%↲&⇥$(↲)*…>, shape="component", style=filled, fillcolor="white"] Class2 [ label=<Classe2.class
byte-code
���␀4C↲(⇥*@,-⇥./↲0⇥.2↲…>, shape="component", style=filled, fillcolor="white"] joint1 [ width=0, height=0, shape=none, label=""] } { rank = same Src1 [ label=<Classe1.java
code source
public class Classe1 { …
>, shape="note", style=filled, fillcolor="#dcf0ff"] } { rank = same Src2 [ label=<Classe2.java
code source
public class Classe2 { …
>, shape="note", style=filled, fillcolor="#dcf0ff"] javac [ label=<javac Classe1.java Classe2.java
compilateur>, shape="rect", style=filled, fillcolor="#dcf0ff"] } javac -> joint1 [ dir=none ] { Src1; Src2 } -> javac [ arrowhead=vee ] Dev -> { Src1;Src2 } [style=invis] JVM [ label=<java Class1
machine virtuelle (JVM)>, shape="rect", style=filled, fillcolor="white"] joint1 -> { Class1; Class2 } [ arrowhead=vee, constraint=false ] { Class1; Class2 } -> JVM [ arrowhead=vee ] Client [ label=<🖳
👱>, fontname="Symbola", fontsize=32, fontcolor=darkgreen, shape=plaintext ] JVM -> Client [dir=none] }
double zeroAbsoluEnDegresCelsius = -273.15;
,
"XXX".equalsIgnoreCase("xxx")
,
in.nextDouble()
public class EauChaude {
,
new FileOutputStream("resultats.txt")
,
} catch (ArrayIndexOutOfBoundsException err) {
public static final double ZERO_ABSOLU_EN_DEGRES_CELSIUS = -273.15;
l'usage d'un environnement de développement intégré (IDE)
est fortement recommandé (lorsque cela est possible).
var
, …
digraph FileOutputStream { bgcolor=transparent id="\G" node [ fontname = "Courier", fontsize = 12, id="\G-\N", style=filled ] FileOutputStream [ shape=plain,label=<
FileOutputStream |
- fd: FileDescriptor - path: String - closed: boolean |
+ FileOutputStream(String) + write(…) + close() |
private
java/io/FileOutputStream.java
package java.io;
public
class FileOutputStream extends OutputStream {
private final FileDescriptor fd;
private final String path;
private boolean closed;
public FileOutputStream(String name) {
…
}
public void write(…) {
…
}
public void close() {
…
}
}
https://github.com/openjdk/jdk/blob/jdk-17-ga/src/java.base/share/classes/java/io/FileOutputStream.java#L69
digraph ModelePrototype { bgcolor=transparent node [ fontname = "Courier", fontsize = 12, id="\G-\N", style=filled ] edge [ fontname = "Courier", fontsize = 11, id="\G-\E" ] value1 [ shape=box,label=<:Number
1> ] value15 [ shape=box,label=<:Number
1.5> ] value30 [ shape=box,label=<:Number
30> ] Number [ shape=plain,label=<
Number«prototype» |
toExponential() toFixed() … |
Object«prototype» |
watch() … |
digraph ModeleClasses { bgcolor=transparent node [ fontname = "Courier", fontsize = 12, id="\G-\N", style=filled ] edge [ fontname = "Courier", fontsize = 11, id="\G-\E" ] subgraph values { value1 [ shape=box,label=<:Integer
1> ] value15 [ shape=box,label=<:Float
1.5> ] value30 [ shape=box,label=<:Integer
30> ] value1 -> value30 -> value15 [ style=invis ] } Integer [ shape=plain,label=<
Integer |
parseInt(…) … |
Float |
parseFloat(…) … |
Number |
intValue() … |
Object |
getClass() … |
digraph ClassesInstances { bgcolor=transparent fontname="Brill" fontsize=26 node [ fontname = "Courier", fontsize = 12, shape="box", id="\G-\N", style=filled ] edge [ fontname = "Courier", fontsize = 11, id="\G-\E" ] subgraph cluster_References { label="Références" bgcolor="#dcf0ff" posX [ shape=box,label=<posX: Number> ] posY [ shape=box,label=<posY: Number> ] distance [ shape=box,label=< distance: Float> ] posX -> posY -> distance [ style=invis ] } subgraph cluster_Instances { label="Instances" bgcolor="#dcf0ff" node [shape="rect"] value1 [ label=<1> ] value15 [ label=<1.5> ] value30 [ label=<30> ] value1 -> value30 -> value15 [ style=invis ] } { edge [constraint=false, dir=both, arrowtail=odiamond,arrowhead=vee,style=solid, arrowsize=.75] posX -> value1 posY -> value30 distance -> value15 } subgraph cluster_Classes { label="Classes" Integer [ shape=plain,label=<
Integer |
parseInt(…) … |
Float |
parseFloat(…) … |
Number |
intValue() … |
Object |
getClass() … |
digraph Vocabulaire { bgcolor=transparent id="\G" concentrate=true node [ fontname = "Courier", fontsize = 12, shape = "record", id="\G-\N", style=filled ] edge [ fontname = "Brill" ] { rank=same est [label="", width=0, height=0, shape=none, class="Vocabulaire-red", fillcolor=red, color=red] Parent [ label= "Classe Parente" ] } { rank=same Object [ shape=box,label=<Objet: Type> ] Child [ shape=plain,label=<
Classe Fille |
attribut: Type variable d'instance + visibilité publique - visibilité privée |
membre(Type,Type): Type méthode(…) méthode d'instance() |
digraph EauChaude1 { bgcolor=transparent id="uml\G" concentrate=true node [ fontname = "Courier", fontsize = 12, shape = "record", id="\G-\N", style=filled ] edge [ fontname = "Brill", id="\G-\E" ] EauChaude1 [ shape=plain,label=<
EauChaude1 |
temperature: double |
etatφ(): String |
digraph umlEauChaudeStatic { bgcolor=transparent id="\G" concentrate=true node [ fontname = "Courier", fontsize = 12, shape = "record", id="\G-\N", style=filled ] edge [ fontname = "Brill", id="\G-\E" ] EauChaudeS [ shape=plain,label=<
EauChaudeS |
temperature : double ZERO_K = -273.15 : double pointFusion = 0 : double pointEbulition = 100 : double |
etatφ() : String main(String[]) |
digraph EauChaude2 { bgcolor=transparent id="uml\G" concentrate=true node [ fontname = "Courier", fontsize = 12, shape = "record", id="\G-\N", style=filled ] edge [ fontname = "Brill", id="\G-\E" ] EauChaude2 [ shape=plain,label=<
EauChaude2 |
-temperature: double |
+setTemperature(double) +getEtatφ(): String |
digraph umlEauChaude2Bis { bgcolor=transparent id="\G" concentrate=true node [ fontname = "Courier", fontsize = 12, shape = "record", id="\G-\N", style=filled ] edge [ fontname = "Brill", id="\G-\E" ] EauChaude2Bis [ shape=plain,label=<
EauChaude2Bis |
-ZERO_K: double -temperature: double |
+setTemperature(double) +getEtatφ(): String |
digraph umlEauChaude2Ter { bgcolor=transparent id="\G" concentrate=true node [ fontname = "Courier", fontsize = 12, shape = "record", id="\G-\N", style=filled ] edge [ fontname = "Brill", id="\G-\E" ] EauChaude2Ter [ shape=plain,label=<
EauChaude2Ter |
-obs: Observe -temperature: double |
+setObservateur(Observe) +setTemperature(double) +getEtatφ(): String |
Observe |
+aChangee() |
λ |
Scanner in = new Scanner(System.in);
EauChaude2Ter eau = new EauChaude2Ter();
((EauChaude2Ter) eau).setObservateur(λ);
((EauChaude2Ter) eau).obs = λ;
System.out.println("température ?");
double t = in.nextDouble();
((EauChaude2Ter) eau).setTemperature(t);
((EauChaude2Ter) eau).temperature = t;
Observe λ = ((EauChaude2Ter) eau).obs;
((Observe) λ).aChangee();
String e = ((EauChaude2Ter) eau).getEtatφ();
System.out.println(e);
new MonBean()
public Type getMaPropriete() {…}
public void setMaPropriete(Type valeur) {…}
final
(hors du champ de ce cours)private Type propriétéTruc;
public Type getPropriétéTruc() {…}
public boolean isPropriétéTruc() {…}
public void setPropriétéTruc(Type …) {…}
private Type xxx;
final
public void setXxx(…) {…}
String
String hello = "Hello" + " " + "World";
Integer
Long
Float
Double
Character
Short
Byte
Boolean
StringBuffer
& StringBuilder
sont des classes mutables destinées+
par lotsStringBuffer
est Thead‑safeStringBuilder
Type maVariable;
byte b;
(8bits)short s;
(16bits)int i;
(32bits)long l;
(64bits)float f;
double d;
boolean p;
char c;
digraph umlBoxing { bgcolor=transparent id="\G" concentrate=true node [ fontname = "Courier", fontsize = 12, id="\G-\N" ] edge [ fontname = "Brill", id="\G-\E" ] subgraph cluster_primitive { color=transparent node [ shape = "plaintext" ] byte; short; int; long; float; double; boolean; char; } { node [ shape = "record", style=filled ] edge [ arrowtail=empty, dir=back ] Byte [ shape=plain,label=<
Byte |
-value: byte |
Short |
-value: short |
Integer |
-value: int |
Long |
-value: long |
Float |
-value: float |
Double |
-value: double |
Boolean |
-value: boolean |
Char |
-value: char |
Integer obj = new Integer(8);
int primitif = obj.intValue();
public int somme(Integer... valeurs) {
Integer somme = 0;
for(Integer valeur : valeurs)
somme += valeur;
return somme;
}
→
public int somme(Integer... valeurs) {
Integer somme = new Integer(0);
for(Integer valeur : valeurs)
somme = new Integer(
somme.intValue()
+ valeur.intValue()
);
return somme.intValue();
}
digraph umlEauChaude3 { bgcolor=transparent id="\G" concentrate=true node [ fontname = "Courier", fontsize = 12, shape = "record", id="\G-\N", style=filled ] edge [ fontname = "Brill", id="\G-\E" ] Temperature3 [ shape=plain,label=<
Temperature3 |
-temperature: double |
+setTemperature(double) +getTemperature(): double |
EauChaude3 |
+getEtatφ(): String |
byte
→ short
→ int
→ long
→ float
→ double
Fille
→ Parente
→ Grandmere
→ Object
double
→ float
→ long
→ int
→ short
→ byte
Object
→ Grandmere
→ Parente
→ Fille
ClassCastException
instanceof
permet de tester le type :
Parent obj;
…
if (obj instanceof Fille) {
Fille objAsFille = (Fille) obj;
…
}
digraph umlEauSalee4 { bgcolor=transparent id="\G" concentrate=true node [ fontname = "Courier", fontsize = 12, shape = "record", id="\G-\N", style=filled ] edge [ fontname = "Brill", id="\G-\E" ] Temperature3 [ shape=plain,label=<
Temperature3 |
-temperature: double |
+setTemperature(double) +getTemperature(): double |
EauChaude3 |
+getEtatφ(): String |
EauSalee4 |
+getEtatφ(): String |
digraph umlHeritageMultiple { bgcolor=transparent id="\G" concentrate=true node [ fontname = "Courier", fontsize = 12, shape = "record", id="\G-\N", style=filled ] edge [ fontname = "Brill", id="\G-\E" ] Temperature [ shape=plain,label=<
Temperature |
-temperature: double |
+setTemperature(double) +getTemperature(): double |
Pression |
-pression: double |
+setPression(double) +getPression(): double |
Eau |
+getEtatφ(): String |
new Melange().getEtatφ()
= ?
digraph umlHeritageMultipleDiamant { bgcolor=transparent id="\G" concentrate=true node [ fontname = "Courier", fontsize = 12, shape = "record", id="\G-\N", style=filled ] edge [ fontname = "Brill", id="\G-\E" ] Matiere [ shape=plain,label=<
Matiere |
+getEtatφ(): String |
Eau |
+getEtatφ(): String |
EauLourde |
+getEtatφ(): String |
Melange |
Matiere5[] diversesEaux = …;
for (Matiere5 eau : diversesEaux) {
eau.setTemperature(temp);
System.out.println(eau.getEtatφ());
}
public String getEtatφ()
n'a pas d'implémentation (code)Matière5
alors que chacune
des sous-classes a la sienne.
public String getEtatφ()
dans Matière5
abstract
new
abstract
{}
class ClasseImpl extends ClassAbstraite
@Overridde
abstract
elles aussi
digraph umlEauChaude5 { bgcolor=transparent id="\G" concentrate=true node [ fontname = "Courier", fontsize = 12, shape = "record", id="\G-\N", style=filled ] edge [ fontname = "Brill", id="\G-\E" ] Matiere5 [ shape=plain,label=<
Matiere5 |
#temperature : double |
+setTemperature(double) +getTemperature() : double +etatφ() : String |
EauChaude5 |
+getEtatφ(): String |
EauSalee5 |
+getEtatφ(): String |
interface
décrit un contrat (ensemble de signatures de méthodes)
implements
doivent honorer
new MaClasse();
)<init>
/<clinit>
a lieu :
static
=
,{ … }
peut être
exécutévoid
)new
)new
this(arguments);
super(arguments);
,
le constructeur sans arguments de cette dernière est invoqué automatiquement
protected void finalize() {…}
@Override
void finalize() {
if (!this.closed)
System.err.println("ATTENTION: ressource non libérée !");
}
public interface AutoCloseable {
void close() throws Exception;
}
try (
InputStream in = new FileInputStream("donnees.txt");
OutputStream out = new FileOutputStream("resultats.txt");
) {
…
in.read(…);
…
out.writeln(…);
…
}
close()
à la fin du blocThrowable
digraph umlThrowable { bgcolor=transparent id="\G" concentrate=true node [ fontname = "Courier", fontsize = 12, shape = "record", id="\G-\N", style=filled ] edge [ fontname = "Brill", id="\G-\E" ] Throwable [ shape=plain,label=<
Throwable |
+getMessage(): String +printStackTrace() +getCause(): Throwable |
Error
est reservé aux erreurs graves de la JVM
digraph umlError { bgcolor=transparent id="\G" concentrate=true node [ fontname = "Courier", fontsize = 12, shape = "record", id="\G-\N", style=filled ] edge [ fontname = "Brill", id="\G-\E" ] Throwable [ shape=plain,label=<
Throwable |
+getMessage(): String +printStackTrace() +getCause(): Throwable |
Exception
est la classe de base pour les erreurs pouvant facilement être saisies
et prises en compte
throws
catch
…Exception
par conventiondigraph umlException { bgcolor=transparent id="\G" concentrate=true node [ fontname = "Courier", fontsize = 12, shape = "record", id="\G-\N", style=filled ] edge [ fontname = "Brill", id="\G-\E" ] Throwable [ shape=plain,label=<
Throwable |
+getMessage(): String +printStackTrace() +getCause(): Throwable |
RuntimeException
est la classe de base pour les erreurs non controlées
throws
/catch
digraph umlException { bgcolor=transparent id="\G" concentrate=true node [ fontname = "Courier", fontsize = 12, shape = "record", id="\G-\N", style=filled ] edge [ fontname = "Brill", id="\G-\E" ] Throwable [ shape=plain,label=<
Throwable |
+getMessage(): String +printStackTrace() +getCause(): Throwable |
} catch (Exception e) {}
est une TRÈS TRÈS TRÈS mauvaise idée
Principe de responsabilité unique
java.lang.reflect
digraph umlReflect { bgcolor=transparent id="\G" concentrate=true scale=.5 node [ fontname = "Courier", fontsize = 10, shape = "record", id="\G-\N", style=filled ] edge [ fontname = "Brill", id="\G-\E" ] Object [ shape=plain,label=<
Object |
+getClass() |
Class |
+forName(String) +getSuperclass() +getInterfaces() +getName() +getSimpleName() +getPackage() +getFields() +getField(String nom) +getMethods() +getMethod(String nom,Class… args) +getConstructors() +getConstructor(Class… args) |
Executable |
+getName() +getParameters() +getParameterCount() +getParameterTypes() +getExceptionTypes() |
Member |
+getName() +getDeclaringClass() |
Constructor |
+newInstance(Object… args) |
Method |
+getReturnType() +invoke(Object obj, Object… args) |
Field |
+getType() +get(Object obj) +set(Object obj, Object value) |
public static void main(String[] args) {
Eau[] eaux = { … };
for(Eau eau: eaux)
System.out.println(eau.getEtatφ());
}
public static void main(String[] args) {
Eau[] eaux = { … };
for(int i=0; i<eaux.length; i++)
{
Eau eau = eaux[i];
System.out.println(eau.getEtatφ());
}
}
public static void main(String[] args) {
Eau[] eaux = { … };
int i=0; // démarrer itération
while(i<eaux.length) // tant qu'il y en a
{
Eau eau = eaux[i++]; // obtenir le suivant
System.out.println(eau.getEtatφ());
}
}
digraph umlReflect { bgcolor=transparent id="\G" concentrate=true scale=.5 node [ fontname = "Courier", fontsize = 10, shape = "record", id="\G-\N", style=filled ] edge [ fontname = "Brill", id="\G-\E" ] ParcourirTableau [ shape=plain,label=<
ParcourirTableau |
-eaux:Eau[] -i:int |
+isFini():boolean +suivant():Eau |
Eau |
+getEtatφ() |
digraph umlReflect { bgcolor=transparent id="\G" concentrate=true scale=.5 node [ fontname = "Courier", fontsize = 10, shape = "record", id="\G-\N", style=filled ] edge [ fontname = "Brill", id="\G-\E" ] { rank=same; Tableau [ shape=plain,label=<
Tableau |
-eaux:Eau[] |
Parcourir |
-i:int |
+isFini():boolean +suivant():Eau |
Eau |
+getEtatφ() |
digraph umlReflect { bgcolor=transparent id="\G" concentrate=true scale=.5 node [ fontname = "Courier", fontsize = 10, shape = "record", id="\G-\N", style=filled ] edge [ fontname = "Brill", id="\G-\E" ] { rank=same; Iterable [ shape=plain,label=<
Iterable‹Eau› |
Iterator‹Eau› |
+hasNext() +next() |
Eau |
+getEtatφ() |
Eaux |
-eaux:Eau[] |
Parcourir |
-i:int |
digraph umlReflect { bgcolor=transparent id="\G" concentrate=true scale=.5 node [ fontname = "Courier", fontsize = 10, shape = "record", id="\G-\N", style=filled ] edge [ fontname = "Brill", id="\G-\E" ] { rank=same; Iterable [ shape=plain,label=<
Iterable‹Eau› |
Iterator‹Eau› |
+hasNext() +next() |
EauxPlage |
-départ,incr,fin:double |
Parcourir |
-temp:double |
Eau |
+getEtatφ() |
digraph umlReflect { bgcolor=transparent id="\G" concentrate=false scale=.5 node [ fontname = "Courier", fontsize = 10, shape = "box", id="\G-\N", style=filled ] edge [ fontname = "Brill", id="\G-\E" ] { rank=same; Iterator [ shape=plain,label=<
Iterator |
+hasNext() +next() |
/** … */
@param …
{@code …}
javadoc
produit un site web
fr.unistra
par exfr.unistra.monapplication.model
,
fr.unistra.monapplication.api
, …
package fr.unistra.eau.model;
import fr.unistra.eau.api.Etatφ;
class EauChaude extends Temperature implements Etatφ { … }
fr/unistra/eau/model
Classe | Package | Classe fille |
le reste du monde |
|
---|---|---|---|---|
private |
✔ | ✗ | ✗ | ✗ |
∅ | ✔ | ✔ | ✗ | ✗ |
protected |
✔ | ✔ | ✔ | ✗ |
public |
✔ | ✔ | ✔ | ✔ |
MakefileCC = gcc
all: prog
prog: main.o module1.o module2.o
$(CC) -g -lm -o $@ $^
%.o: %c
$(CC) -o $@ -c $<
clean:
rm -f prog *.o
.PHONY: all clean
build.xml
<javac srcdir="." destdir="."/>
<fileset file="prog" />
<fileset dir="." includes="**/*.class" />
„Write once, run anywhere”
build.xml
<javac srcdir="." destdir="." />
<fileset file="prog" />
<fileset dir="." includes="**/*.class" />
pom.xml<project>
<modelVersion>4.0.0</modelVersion>
<groupId>fr.unistra.app</groupId>
<artifactId>mon-projet</artifactId>
<version>1</version>
</project>
src/main/java
src/main/resources
src/test/java
src/test/resources
target/classes
target/mon-projet-1.jar
pom.xml<project>
<modelVersion>4.0.0</modelVersion>
<groupId>fr.unistra.app</groupId>
<artifactId>mon-projet</artifactId>
<version>1</version>
</project>
digraph mavenLifecycle { bgcolor=transparent id="\G" concentrate=true node [ fontname = "Courier", fontsize = 12, id="\G-\N", shape=plain, style=filled, fillcolor=ivory ] edge [ fontname = "Brill", id="\G-\E", arrowhead=inv, arrowsize=.6] { rank = same compile -> clean [style=invis]; } compile -> test -> package; { rank = same; package -> verify; } deploy -> install -> verify [ dir = back, arrowtail=inv]; }
build.gradleplugins { id 'application' } version = '1.0.0' application { mainClassName = 'fr.unistra.app.Programme' }
task helloWorld() { doLast { println 'Hello World' } }
digraph gradleLifecycle { bgcolor=transparent id="\G" concentrate=true rankdir=LR ranksep=0.2 nodesep=0.2 node [ fontname = "Courier", fontsize = 12, id="\G-\N", shape=plain, style=filled, fillcolor=ivory ] edge [ fontname = "Brill", id="\G-\E", arrowtail=inv, dir=back, arrowsize=.6] { rank = same; clean -> build [style=invis]; } build -> check -> test -> { classes; testClasses }; build -> assemble -> jar -> classes; { rank = same; compileTestJava [fontsize = 8]; compileJava [fontsize = 8]; testClasses -> classes -> compileJava; compileTestJava -> testClasses [dir=forward, arrowhead=inv] } processTestResources [fontsize=8]; processResources [fontsize=8]; classes -> processResources compileTestJava -> processTestResources [style=invis] processTestResources -> testClasses [dir=forward, arrowhead=inv] compileJava -> processResources [style=invis] run [fillcolor=palegreen]; run -> classes; javadoc -> classes; run -> javadoc [style=invis]; distZip [fillcolor=palegreen, fontsize=8]; distZip -> jar; startScripts [fillcolor=palegreen, fontsize=6]; startScripts -> distZip [dir=forward, arrowhead=inv]; }
Le format d'archive utilisé par java est le format ZIP.
.jar
regroupe la plupart du temps des fichier bytecode .class
ClassLoader
java -jar prog.jar fr.unistra.Programme
.java
.html
).war
ou Web Archive : destiné à déployer des applications web
WEB-INF/web.xml
configure le déploiementWEB-INF/classes
contient les fichiers bytecode .classWEB-INF/lib
contient les .jar chargés par le ClassLoader
jar
permet de manipuler des java archivestar
pom.xml<project>
<modelVersion>4.0.0</modelVersion>
<groupId>fr.unistra.app</groupId>
<artifactId>mon-projet</artifactId>
<version>1</version>
<dependency>
<groupId>com.googlecode.libphonenumber</groupId>
<artifactId>libphonenumber</artifactId>
<version>8.12.18</version>
</dependency>
</project>
build.gradleplugins {
id 'application'
}
version = '1.0.0'
repositories {
mavenCentral()
}
dependencies {
implementation 'com.googlecode.libphonenumber:libphonenumber:8.12.18'
}
application {
mainClassName = 'fr.unistra.app.Programme'
}