I want to build an android APK, and acquiring a PC and setting up Android Studio 6GB+ seems to be too much for me to do, atleast for the foreseeable future, in my current circumstances.
So I looked around and found out about building projects online, with things like Travis and Google cloud builder.
I'm not sure which one's the best or most reliable, or whether thy even work the way I imagine them to (my highest experience with building projects is compiling apks from libgdx and a java IDE, but that was pretty straight forward), but it says it generates artifacts so it should work? And does it change the icon image/sign, etc? I just need it to be installable on modern phones, not planning to release to play store.
So I know it might be too much to ask someone to just "do an example for me" so I asked AI to help, but we all know how AI is when it comes to writing code and giving programming instructions in general. Semi-accurate but prone to mistakes (for now anyway).
So can someone who knows about builds please look into this and it's possibility:
What I got from AI
Code: Select all
To use Google Cloud Builder to build a Love2D APK, follow these steps:
1. Create a Google Cloud account and enable the Cloud Build API.
2. Install the Google Cloud SDK and configure it with your account credentials.
3. Create a new directory for your Love2D project and navigate to it in the terminal.
4. Initialize a new Git repository and create a `cloudbuild.yaml` file with the following content:
```
steps:
- name: 'gcr.io/cloud-builders/docker'
args: ['build', '-t', 'gcr.io/$PROJECT_ID/love2d-image', '.']
- name: 'gcr.io/cloud-builders/docker'
args: ['push', 'gcr.io/$PROJECT_ID/love2d-image']
- name: 'gcr.io/cloud-builders/docker'
args: ['run', 'gcr.io/$PROJECT_ID/love2d-image', 'love2d', './path/to/your/game.love']
```
Replace `./path/to/your/game.love` with the actual path to your Love2D game file.
1. Create a `Dockerfile` in the same directory with the following content:
```
FROM ubuntu:latest
RUN apt-get update && apt-get install -y love2d
COPY . /app
WORKDIR /app
CMD ["love", "./game.love"]
```
1. Run the command `gcloud builds submit --config cloudbuild.yaml` to trigger the build process.
2. Cloud Build will create a Docker image with Love2D installed and run your game inside the container.
3. Once the build is complete, you can retrieve the built APK from the Cloud Storage bucket specified in the `cloudbuild.yaml` file.
Note: You may need to modify the `cloudbuild.yaml` and `Dockerfile` files to suit your specific requirements. Additionally, ensure you have the necessary dependencies and files in your project directory.@