Skip to content

Commit e1ca42e

Browse files
committed
start feat
1 parent ff5dc43 commit e1ca42e

File tree

5 files changed

+150
-2
lines changed

5 files changed

+150
-2
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
*.iml
2+
.DS_Store
3+
.idea/
4+
target/

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
# Coming soon
2-
Icaro package manager
1+
# Icaro package manager

pom.xml

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3+
<modelVersion>4.0.0</modelVersion>
4+
<groupId>org.icaro</groupId>
5+
<artifactId>cli</artifactId>
6+
<version>0.1</version>
7+
<packaging>jar</packaging>
8+
<name>Icaro programming language CLI</name>
9+
<url>http://maven.apache.org</url>
10+
<properties>
11+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
12+
<kotlin.version>1.7.20</kotlin.version>
13+
<maven.compiler.source>11</maven.compiler.source>
14+
<maven.compiler.target>11</maven.compiler.target>
15+
</properties>
16+
<dependencies>
17+
<dependency>
18+
<groupId>info.picocli</groupId>
19+
<artifactId>picocli</artifactId>
20+
<version>4.6.3</version>
21+
</dependency>
22+
<dependency>
23+
<groupId>org.jetbrains.kotlin</groupId>
24+
<artifactId>kotlin-stdlib-jdk8</artifactId>
25+
<version>${kotlin.version}</version>
26+
</dependency>
27+
<dependency>
28+
<groupId>org.jetbrains.kotlin</groupId>
29+
<artifactId>kotlin-test</artifactId>
30+
<version>${kotlin.version}</version>
31+
<scope>test</scope>
32+
</dependency>
33+
<!-- Testing Dependencies -->
34+
<dependency>
35+
<groupId>org.assertj</groupId>
36+
<artifactId>assertj-core</artifactId>
37+
<version>3.23.1</version>
38+
<scope>test</scope>
39+
</dependency>
40+
<dependency>
41+
<groupId>org.junit.jupiter</groupId>
42+
<artifactId>junit-jupiter-api</artifactId>
43+
<version>5.9.0</version>
44+
<scope>test</scope>
45+
</dependency>
46+
<dependency>
47+
<groupId>org.junit.jupiter</groupId>
48+
<artifactId>junit-jupiter-engine</artifactId>
49+
<version>5.9.0</version>
50+
<scope>test</scope>
51+
</dependency>
52+
</dependencies>
53+
<build>
54+
<plugins>
55+
<plugin>
56+
<groupId>org.jetbrains.kotlin</groupId>
57+
<artifactId>kotlin-maven-plugin</artifactId>
58+
<version>${kotlin.version}</version>
59+
<executions>
60+
<execution>
61+
<id>compile</id>
62+
<phase>compile</phase>
63+
<goals>
64+
<goal>compile</goal>
65+
</goals>
66+
<configuration>
67+
<sourceDirs>
68+
<source>src/main/kotlin</source>
69+
</sourceDirs>
70+
</configuration>
71+
</execution>
72+
<execution>
73+
<id>test-compile</id>
74+
<phase>test-compile</phase>
75+
<goals>
76+
<goal>test-compile</goal>
77+
</goals>
78+
<configuration>
79+
<sourceDirs>
80+
<source>src/test/kotlin</source>
81+
</sourceDirs>
82+
</configuration>
83+
</execution>
84+
</executions>
85+
</plugin>
86+
<plugin>
87+
<groupId>org.apache.maven.plugins</groupId>
88+
<artifactId>maven-assembly-plugin</artifactId>
89+
<version>3.3.0</version>
90+
<configuration>
91+
<descriptorRefs>
92+
<descriptorRef>jar-with-dependencies</descriptorRef>
93+
</descriptorRefs>
94+
<archive>
95+
<manifest>
96+
<mainClass>MainKt</mainClass>
97+
</manifest>
98+
</archive>
99+
</configuration>
100+
<executions>
101+
<execution>
102+
<id>simple-command</id>
103+
<phase>package</phase>
104+
<goals>
105+
<goal>single</goal>
106+
</goals>
107+
</execution>
108+
</executions>
109+
</plugin>
110+
<plugin>
111+
<groupId>org.apache.maven.plugins</groupId>
112+
<artifactId>maven-surefire-plugin</artifactId>
113+
<version>2.22.1</version>
114+
</plugin>
115+
</plugins>
116+
</build>
117+
</project>
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package commands
2+
3+
import picocli.CommandLine
4+
5+
@CommandLine.Command(name = "lang-use", description = ["From now the code will be compiled with the given language version"])
6+
class LangUse : Runnable {
7+
@CommandLine.Parameters(paramLabel = "<version>", description = ["language version"])
8+
lateinit var langVersion: String
9+
10+
override fun run() {
11+
12+
}
13+
}

src/main/kotlin/main.kt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import commands.LangUse
2+
import picocli.CommandLine
3+
import picocli.CommandLine.*
4+
import kotlin.system.exitProcess
5+
6+
@Command(
7+
name = "icaro",
8+
subcommands = [LangUse::class, HelpCommand::class],
9+
description = ["The Icaro programming language CLI"]
10+
)
11+
class Icaro
12+
13+
fun main(args: Array<String>) {
14+
exitProcess(CommandLine(Icaro()).execute(*args))
15+
}

0 commit comments

Comments
 (0)