Skip to content

Commit

Permalink
refactor: move to kotlin
Browse files Browse the repository at this point in the history
  • Loading branch information
brenoepics committed Mar 12, 2024
1 parent b40cad0 commit 4791eb6
Show file tree
Hide file tree
Showing 15 changed files with 364 additions and 257 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created
# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#apache-maven-with-a-settings-path

name: Maven Package

on:
push:
branches:
- main
jobs:
build:

runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file

- name: Build Plugins
run: mvn clean -B package --file pom.xml
- run: mkdir staging && cp target/*-jar-with-dependencies.jar staging
- run: cp *.sql staging
- uses: actions/upload-artifact@v1
with:
name: Plugin
path: staging
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
90 changes: 86 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,90 @@
<version>2.0</version>
<build>
<plugins>
<plugin>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-maven-plugin</artifactId>
<version>${kotlin.version}</version>
<executions>
<execution>
<id>compile</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
</execution>
<execution>
<id>test-compile</id>
<phase>test-compile</phase>
<goals>
<goal>test-compile</goal>
</goals>
</execution>
</executions>
<configuration>
<jvmTarget>1.8</jvmTarget>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<executions>
<execution>
<id>default-compile</id>
<phase>none</phase>
</execution>
<execution>
<id>default-testCompile</id>
<phase>none</phase>
</execution>
<execution>
<id>compile</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
</execution>
<execution>
<id>testCompile</id>
<phase>test-compile</phase>
<goals>
<goal>testCompile</goal>
</goals>
</execution>
</executions>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<archive>
<manifest>
<mainClass>io.github.brenoepics.NFTAvatar</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<kotlin.version>1.9.23</kotlin.version>
</properties>
<repositories>
<repository>
Expand All @@ -36,10 +107,21 @@
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.30</version>
<scope>provided</scope>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>2.1.0-alpha1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib-jdk8</artifactId>
<version>${kotlin.version}</version>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-test</artifactId>
<version>${kotlin.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
62 changes: 0 additions & 62 deletions src/main/java/com/brenoepic/NFTAvatar.java

This file was deleted.

23 changes: 0 additions & 23 deletions src/main/java/com/brenoepic/clothes/Clothing.java

This file was deleted.

73 changes: 0 additions & 73 deletions src/main/java/com/brenoepic/clothes/ClothingManager.java

This file was deleted.

53 changes: 0 additions & 53 deletions src/main/java/com/brenoepic/clothes/ClothingUtility.java

This file was deleted.

26 changes: 0 additions & 26 deletions src/main/java/com/brenoepic/command/UpdateLooksCommand.java

This file was deleted.

Loading

0 comments on commit 4791eb6

Please sign in to comment.