-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
861dfb0
commit 4f633df
Showing
10 changed files
with
180 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the | ||
// README at: https://github.com/devcontainers/templates/tree/main/src/docker-existing-dockerfile | ||
{ | ||
"name": "Noticeboard Docker File", | ||
"build": { | ||
// Sets the run context to one level up instead of the .devcontainer folder. | ||
"context": "..", | ||
// Update the 'dockerFile' property if you aren't using the standard 'Dockerfile' filename. | ||
"dockerfile": "../Dockerfile" | ||
}, | ||
|
||
// Features to add to the dev container. More info: https://containers.dev/features. | ||
// "features": {}, | ||
|
||
// Use 'forwardPorts' to make a list of ports inside the container available locally. | ||
"forwardPorts": [5037], | ||
|
||
// Uncomment the next line to run commands after the container is created. | ||
// "postCreateCommand": "cat /etc/os-release", | ||
|
||
// Configure tool-specific properties. | ||
// "customizations": {}, | ||
|
||
// Uncomment to connect as an existing user other than the container default. More info: https://aka.ms/dev-containers-non-root. | ||
// "remoteUser": "devcontainer" | ||
"dockerRun": {"runArgs": ["--privileged"]} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# Use ubuntu 22.04 LTS as Base Image | ||
FROM ubuntu:22.04 | ||
|
||
# This sets up java in the container | ||
RUN apt update && apt install -y curl git unzip xz-utils zip libglu1-mesa openjdk-8-jdk wget adb libjaxb-api-java | ||
|
||
# Set up new user | ||
RUN useradd -ms /bin/bash developer | ||
WORKDIR /home/developer | ||
|
||
# Prepare Android directories and system variables | ||
RUN cd /home/developer | ||
RUN mkdir -p Android/sdk | ||
ENV ANDROID_SDK_ROOT /home/developer/Android/sdk | ||
RUN mkdir -p .android && touch .android/repositories.cfg | ||
|
||
# Set up Android SDK and accept licenses | ||
RUN wget -O sdk-tools.zip https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip | ||
RUN unzip sdk-tools.zip && rm sdk-tools.zip | ||
RUN cd /home/developer | ||
RUN mv tools Android/sdk/tools | ||
RUN cd Android/sdk/tools/bin && yes | ./sdkmanager --licenses | ||
RUN cd /home/developer | ||
RUN cd Android/sdk/tools/bin && touch /root/.android/repositories.cfg && ./sdkmanager "build-tools;29.0.2" "platform-tools" "platforms;android-29" "sources;android-29" "cmdline-tools;latest" | ||
ENV PATH "$PATH:/home/developer/Android/sdk/platform-tools" | ||
|
||
# Download Flutter SDK and add flutter to path | ||
RUN cd /home/developer | ||
RUN wget https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_3.19.1-stable.tar.xz | ||
RUN tar -xvf flutter_linux_3.19.1-stable.tar.xz | ||
RUN git config --global --add safe.directory /home/developer/flutter | ||
WORKDIR /home/developer | ||
ENV PATH "$PATH:/home/developer/flutter/bin" | ||
|
||
# Run basic check to download Dark SDK | ||
RUN flutter doctor | ||
|
||
# Install JavaDevelopment Kit | ||
RUN apt install -y openjdk-17-jdk | ||
|
||
# Accept all Android-SDK licenses | ||
RUN flutter doctor --android-licenses | ||
|
||
# Verify android toolchain is set up for development | ||
RUN flutter doctor -v | ||
|
||
# Go to noticeboard-mobile directory | ||
WORKDIR /workspaces/noticeboard-mobile-app/noticeboard | ||
|
||
|
||
# Install dependencies | ||
CMD [ "flutter" "pub" "get" ] | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,26 @@ | ||
include ':app' | ||
pluginManagement { | ||
def flutterSdkPath = { | ||
def properties = new Properties() | ||
file("local.properties").withInputStream { properties.load(it) } | ||
def flutterSdkPath = properties.getProperty("flutter.sdk") | ||
assert flutterSdkPath != null, "flutter.sdk not set in local.properties" | ||
return flutterSdkPath | ||
}() | ||
|
||
def localPropertiesFile = new File(rootProject.projectDir, "local.properties") | ||
def properties = new Properties() | ||
includeBuild("$flutterSdkPath/packages/flutter_tools/gradle") | ||
|
||
assert localPropertiesFile.exists() | ||
localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } | ||
repositories { | ||
google() | ||
mavenCentral() | ||
gradlePluginPortal() | ||
} | ||
} | ||
|
||
def flutterSdkPath = properties.getProperty("flutter.sdk") | ||
assert flutterSdkPath != null, "flutter.sdk not set in local.properties" | ||
apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" | ||
plugins { | ||
id "dev.flutter.flutter-plugin-loader" version "1.0.0" | ||
id "com.android.application" version "7.3.0" apply false | ||
id "com.google.gms.google-services" version "4.3.14" apply false | ||
id "org.jetbrains.kotlin.android" version "1.9.23" apply false | ||
} | ||
|
||
include ":app" |