-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: update build process #22
Conversation
60b2115
to
c5ff1da
Compare
.github/workflows/validate.yml
Outdated
@@ -21,7 +21,7 @@ jobs: | |||
uses: ./.github/actions/setup | |||
|
|||
- name: Build Android | |||
run: ./gradlew assemble${{ matrix.type }} | |||
run: ./gradlew clean assemble${{ matrix.type }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a shame if we clean every time, because that clears the work we cached and slows things down. Can we run a specific gradle task do clean what we need?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes we can run copyCommonResourcesToFlavor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm also thinking, maybe it can go into the actions/setup
?
@@ -5,7 +5,7 @@ android-compileSdk = "34" | |||
android-minSdk = "24" | |||
android-targetSdk = "34" | |||
|
|||
compose-plugin = "1.7.0-alpha02" | |||
compose-plugin = "1.6.11" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can go back to the stable version? Nice!
@@ -279,3 +273,15 @@ fun copyRecursive( | |||
} | |||
} | |||
} | |||
|
|||
tasks.register("runDebug", Exec::class) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need this task?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This enables us to set up custom gradle tasks with composeApp:runDebug -Porganization=ooni
or composeApp:runDebug -Porganization=dw
to run the various flavors without needing to edit files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't tried any option that works
.github/workflows/validate.yml
Outdated
@@ -21,7 +21,7 @@ jobs: | |||
uses: ./.github/actions/setup | |||
|
|||
- name: Build Android | |||
run: ./gradlew assemble${{ matrix.type }} | |||
run: ./gradlew clean assemble${{ matrix.type }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm also thinking, maybe it can go into the actions/setup
?
@@ -279,3 +273,15 @@ fun copyRecursive( | |||
} | |||
} | |||
} | |||
|
|||
tasks.register("runDebug", Exec::class) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -279,3 +272,15 @@ fun copyRecursive( | |||
} | |||
} | |||
} | |||
|
|||
tasks.register("runDebug", Exec::class) { | |||
dependsOn("clean", "uninstallDebug", "installDebug") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like instead of relying so much on the clean
gradle task to copy the resources as we need every time, we should figure out the right gradle task that runs on every build. Isn't the preBuild
setup working?
Because running clean
often slows down everything.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The pre build works locally but for some reason it fails on the ci
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I run gradlew assemble
it works fine locally, it grabs the resources.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but you can launch the dw
flavor
4410509
to
e9339c1
Compare
e9339c1
to
46fabd4
Compare
|
||
- name: Build iOS | ||
- name: Build iOS Framework |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should have the organization flag to no? Once we fix it...
No description provided.