Skip to content

Commit

Permalink
zadanie 1
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikolaj Golowski committed Apr 1, 2024
1 parent a4f03bc commit f693d36
Show file tree
Hide file tree
Showing 23 changed files with 235 additions and 1 deletion.
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,13 @@
"# ebiznes"
# ebiznes

## Zadanie 1 Tytuł

✅ 3.0 wymaganie 1 [link]

✅ 3.5 wymaganie 2 Link do commita 2

✅ 4.0 wymaganie 3 Link do commita 3

❌ 4.5 wymaganie 4 Link do commita 4

❌ 5.0 wymaganie 5 Link do commita 5
11 changes: 11 additions & 0 deletions Zadanie1/wym1/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM ubuntu:22.04

ENV TZ=Europe/Warsaw
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

# instalacja pythona 3.8
RUN apt-get update && \
apt-get install -y software-properties-common && \
add-apt-repository ppa:deadsnakes/ppa && \
apt-get update && \
apt-get install -y python3.8 python3-pip
17 changes: 17 additions & 0 deletions Zadanie1/wym2/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM ubuntu:22.04

ENV TZ=Europe/Warsaw
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

# instalacja pythona 3.8, javy, kotlina
RUN apt-get update && \
apt-get install -y software-properties-common && \
add-apt-repository ppa:deadsnakes/ppa && \
apt-get update && \
apt-get install -y python3.8 python3-pip openjdk-8-jdk wget unzip

RUN wget https://github.com/JetBrains/kotlin/releases/download/v1.4.32/kotlin-compiler-1.4.32.zip && \
unzip kotlin-compiler-1.4.32.zip -d /usr/local && \
rm kotlin-compiler-1.4.32.zip

ENV PATH="${PATH}:/usr/local/kotlinc/bin"
33 changes: 33 additions & 0 deletions Zadanie1/wym3/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
FROM ubuntu:22.04

ENV TZ=Europe/Warsaw
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

# instalacja pythona 3.8, javy, kotlina
RUN apt-get update && \
apt-get install -y software-properties-common && \
add-apt-repository ppa:deadsnakes/ppa && \
apt-get update && \
apt-get install -y python3.8 python3-pip openjdk-8-jdk wget unzip

RUN wget https://github.com/JetBrains/kotlin/releases/download/v1.4.32/kotlin-compiler-1.4.32.zip && \
unzip kotlin-compiler-1.4.32.zip -d /usr/local && \
rm kotlin-compiler-1.4.32.zip

# dodanie kotlina do path
ENV PATH="${PATH}:/usr/local/kotlinc/bin"

ENV GRADLE_HOME=/app/gradle-7.3
ENV PATH=$PATH:$GRADLE_HOME/bin

# instalacja Gradle
RUN wget https://services.gradle.org/distributions/gradle-7.3-bin.zip && \
unzip gradle-7.3-bin.zip -d /opt/gradle && \
rm gradle-7.3-bin.zip

# dodanie gradle do path
ENV PATH="${PATH}:/opt/gradle/gradle-7.3/bin"

WORKDIR /app
# dodanie SQLite JDBC
RUN echo "implementation 'org.xerial:sqlite-jdbc:3.36.0.1'" >> build.gradle
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Empty file.
Empty file.
33 changes: 33 additions & 0 deletions Zadanie1/wym4/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
FROM ubuntu:22.04

ENV TZ=Europe/Warsaw
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

# instalacja pythona 3.8, javy, kotlina
RUN apt-get update && \
apt-get install -y software-properties-common && \
add-apt-repository ppa:deadsnakes/ppa && \
apt-get update && \
apt-get install -y python3.8 python3-pip openjdk-8-jdk wget unzip zip

RUN wget https://github.com/JetBrains/kotlin/releases/download/v1.9.23/kotlin-compiler-1.9.23.zip && \
unzip kotlin-compiler-1.9.23.zip -d /usr/local && \
rm kotlin-compiler-1.9.23.zip

# dodanie kotlina do path
ENV PATH="${PATH}:/usr/local/kotlinc/bin"

RUN wget https://services.gradle.org/distributions/gradle-8.1-bin.zip && \
mkdir /opt/gradle && \
unzip -d /opt/gradle gradle-8.1-bin.zip && \
export PATH=$PATH:/opt/gradle/gradle-8.1/bin

ENV GRADLE_HOME=/opt/gradle/gradle-8.1
ENV PATH=$PATH:$GRADLE_HOME/bin

WORKDIR /app
RUN gradle init \
--type kotlin-application \
--dsl kotlin

RUN ./gradlew build
3 changes: 3 additions & 0 deletions Zadanie1/wym4/HelloWorld.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
fun main() {
println("Hello, World!")
}
31 changes: 31 additions & 0 deletions Zadanie1/wym4/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// For `KotlinCompile` task below
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
kotlin("jvm") version "1.9.23" // Kotlin version to use
application // Application plugin. Also see 1️⃣ below the code
}

group = "org.example" // A company name, for example, `org.jetbrains`
version = "1.0-SNAPSHOT" // Version to assign to the built artifact

repositories { // Sources of dependencies. See 2️⃣
mavenCentral() // Maven Central Repository. See 3️⃣
}

dependencies { // All the libraries you want to use. See 4️⃣
// Copy dependencies' names after you find them in a repository
testImplementation(kotlin("test")) // The Kotlin test library
}

tasks.test { // See 5️⃣
useJUnitPlatform() // JUnitPlatform for tests. See 6️⃣
}

kotlin { // Extension for easy setup
jvmToolchain(17) // Target version of generated JVM bytecode. See 7️⃣
}

application {
mainClass.set("MainKt") // The main class of the application
}
8 changes: 8 additions & 0 deletions Zadanie1/wym4/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
version: '3.8'
services:
app:
build: .
volumes:
- .:/app
working_dir: /app
command: ls
3 changes: 3 additions & 0 deletions Zadanie1/wym4/settings.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
plugins {
id 'org.gradle.toolchains.foojay-resolver-convention' version '0.8.0'
}
38 changes: 38 additions & 0 deletions Zadanie1/wym5/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
FROM ubuntu:22.04

ENV TZ=Europe/Warsaw
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

# instalacja pythona 3.8, javy, kotlina
RUN apt-get update && \
apt-get install -y software-properties-common && \
add-apt-repository ppa:deadsnakes/ppa && \
apt-get update && \
apt-get install -y python3.8 python3-pip openjdk-8-jdk wget unzip zip

RUN wget https://github.com/JetBrains/kotlin/releases/download/v1.9.23/kotlin-compiler-1.9.23.zip && \
unzip kotlin-compiler-1.9.23.zip -d /usr/local && \
rm kotlin-compiler-1.9.23.zip

# dodanie kotlina do path
ENV PATH="${PATH}:/usr/local/kotlinc/bin"

RUN wget https://services.gradle.org/distributions/gradle-8.1-bin.zip && \
mkdir /opt/gradle && \
unzip -d /opt/gradle gradle-8.1-bin.zip && \
export PATH=$PATH:/opt/gradle/gradle-8.1/bin

ENV GRADLE_HOME=/opt/gradle/gradle-8.1
ENV PATH=$PATH:$GRADLE_HOME/bin

WORKDIR /app
RUN gradle init \
--type kotlin-application \
--dsl kotlin

# COPY HelloWorld.kt /app/src/kotlin
# COPY build.gradle.kts /app/
# COPY settings.gradle /app/

RUN ./gradlew build
# CMD ["java","-jar","run.jar"]
3 changes: 3 additions & 0 deletions Zadanie1/wym5/HelloWorld.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
fun main() {
println("Hello, World!")
}
31 changes: 31 additions & 0 deletions Zadanie1/wym5/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// For `KotlinCompile` task below
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
kotlin("jvm") version "1.9.23" // Kotlin version to use
application // Application plugin. Also see 1️⃣ below the code
}

group = "org.example" // A company name, for example, `org.jetbrains`
version = "1.0-SNAPSHOT" // Version to assign to the built artifact

repositories { // Sources of dependencies. See 2️⃣
mavenCentral() // Maven Central Repository. See 3️⃣
}

dependencies { // All the libraries you want to use. See 4️⃣
// Copy dependencies' names after you find them in a repository
testImplementation(kotlin("test")) // The Kotlin test library
}

tasks.test { // See 5️⃣
useJUnitPlatform() // JUnitPlatform for tests. See 6️⃣
}

kotlin { // Extension for easy setup
jvmToolchain(17) // Target version of generated JVM bytecode. See 7️⃣
}

application {
mainClass.set("MainKt") // The main class of the application
}
8 changes: 8 additions & 0 deletions Zadanie1/wym5/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
version: '3.8'
services:
app:
build: .
volumes:
- .:/app
working_dir: /app
command: ls
3 changes: 3 additions & 0 deletions Zadanie1/wym5/settings.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
plugins {
id 'org.gradle.toolchains.foojay-resolver-convention' version '0.8.0'
}
Binary file added demos/1/2024-04-01 23-37-32.mp4
Binary file not shown.
Binary file added demos/1/2024-04-01 23-38-03.mp4
Binary file not shown.

0 comments on commit f693d36

Please sign in to comment.