Skip to content

Commit eae3ab4

Browse files
Merge branch 'master' into mv/crane_jetnews_alpha04
2 parents 3d27bbd + 195b775 commit eae3ab4

File tree

26 files changed

+213
-246
lines changed

26 files changed

+213
-246
lines changed

.github/workflows/Release.yml

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
name: GitHub Release with APKs
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
timeout-minutes: 45
12+
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v2
16+
17+
- name: Copy CI gradle.properties
18+
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties
19+
20+
- name: Set up JDK 1.8
21+
uses: actions/setup-java@v1
22+
with:
23+
java-version: 1.8
24+
25+
- name: Build all projects
26+
run: ./scripts/gradlew_recursive.sh assembleDebug
27+
28+
- name: Create Release
29+
id: create_release
30+
uses: actions/create-release@v1
31+
env:
32+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33+
with:
34+
tag_name: ${{ github.ref }}
35+
release_name: ${{ github.ref }}
36+
draft: true
37+
prerelease: false
38+
39+
- name: Upload Crane
40+
uses: actions/upload-release-asset@v1
41+
env:
42+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43+
with:
44+
upload_url: ${{ steps.create_release.outputs.upload_url }}
45+
asset_path: Crane/app/build/outputs/apk/debug/app-debug.apk
46+
asset_name: crane-debug.apk
47+
asset_content_type: application/vnd.android.package-archive
48+
49+
- name: Upload Owl
50+
uses: actions/upload-release-asset@v1
51+
env:
52+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
53+
with:
54+
upload_url: ${{ steps.create_release.outputs.upload_url }}
55+
asset_path: Owl/app/build/outputs/apk/debug/app-debug.apk
56+
asset_name: owl-debug.apk
57+
asset_content_type: application/vnd.android.package-archive
58+
59+
- name: Upload Rally
60+
uses: actions/upload-release-asset@v1
61+
env:
62+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
63+
with:
64+
upload_url: ${{ steps.create_release.outputs.upload_url }}
65+
asset_path: Rally/app/build/outputs/apk/debug/app-debug.apk
66+
asset_name: rally-debug.apk
67+
asset_content_type: application/vnd.android.package-archive
68+
69+
- name: Upload Jetcaster
70+
uses: actions/upload-release-asset@v1
71+
env:
72+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
73+
with:
74+
upload_url: ${{ steps.create_release.outputs.upload_url }}
75+
asset_path: Jetcaster/app/build/outputs/apk/debug/app-debug.apk
76+
asset_name: jetcaster-debug.apk
77+
asset_content_type: application/vnd.android.package-archive
78+
79+
- name: Upload Jetchat
80+
uses: actions/upload-release-asset@v1
81+
env:
82+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
83+
with:
84+
upload_url: ${{ steps.create_release.outputs.upload_url }}
85+
asset_path: Jetchat/app/build/outputs/apk/debug/app-debug.apk
86+
asset_name: jetchat-debug.apk
87+
asset_content_type: application/vnd.android.package-archive
88+
89+
- name: Upload Jetnews
90+
uses: actions/upload-release-asset@v1
91+
env:
92+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
93+
with:
94+
upload_url: ${{ steps.create_release.outputs.upload_url }}
95+
asset_path: JetNews/app/build/outputs/apk/debug/app-debug.apk
96+
asset_name: jetnews-debug.apk
97+
asset_content_type: application/vnd.android.package-archive
98+
99+
- name: Upload Jetsnack
100+
uses: actions/upload-release-asset@v1
101+
env:
102+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
103+
with:
104+
upload_url: ${{ steps.create_release.outputs.upload_url }}
105+
asset_path: Jetsnack/app/build/outputs/apk/debug/app-debug.apk
106+
asset_name: jetsnack-debug.apk
107+
asset_content_type: application/vnd.android.package-archive
108+
109+
- name: Upload Jetsurvey
110+
uses: actions/upload-release-asset@v1
111+
env:
112+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
113+
with:
114+
upload_url: ${{ steps.create_release.outputs.upload_url }}
115+
asset_path: Jetsurvey/app/build/outputs/apk/debug/app-debug.apk
116+
asset_name: jetsurvey-debug.apk
117+
asset_content_type: application/vnd.android.package-archive

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ accept your pull requests.
1818

1919
## Contributing A Patch
2020

21-
All development is done on the `develop` branch. You should base any changes from this branch.
21+
All development is done on the latest `dev_XX` branch. You should base any changes from this branch.
2222

2323
1. Submit an issue describing your proposed change to the repo in question.
2424
1. The repo owner will respond to your issue promptly.
@@ -30,4 +30,4 @@ All development is done on the `develop` branch. You should base any changes fro
3030
[Kotlin Style Guide](https://android.github.io/kotlin-guides/style.html) for the
3131
recommended coding standards for this organization.
3232
1. Ensure that your code has an appropriate set of unit tests which all pass.
33-
1. Submit a pull request targeting the `develop` branch.
33+
1. Submit a pull request targeting the latest `dev_XX` branch.

Crane/build.gradle

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,18 @@ subprojects {
6969
freeCompilerArgs += '-Xallow-jvm-ir-dependencies'
7070
}
7171
}
72-
}
72+
73+
// Crane uses Compose alpha03 and Android Gradle Plugin 4.2.0-alpha13 which are incompatible
74+
// TODO: Remove this workaround when updating to >alpha04
75+
configurations.configureEach {
76+
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
77+
def group = details.requested.group
78+
def module = details.requested.module.name
79+
def version = details.requested.version
80+
81+
if (group == 'androidx.compose.compiler' && module == 'compiler') {
82+
details.useTarget("androidx.compose:compose-compiler:$version")
83+
}
84+
}
85+
}
86+
}

Crane/buildSrc/src/main/java/com/example/crane/buildsrc/Dependencies.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ object Versions {
2121
}
2222

2323
object Libs {
24-
const val androidGradlePlugin = "com.android.tools.build:gradle:4.2.0-alpha11"
24+
const val androidGradlePlugin = "com.android.tools.build:gradle:4.2.0-alpha13"
2525
const val ktLint = "com.pinterest:ktlint:${Versions.ktLint}"
2626
const val googleMaps = "com.google.android.libraries.maps:maps:3.1.0-beta"
2727

JetNews/build.gradle

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616

1717
buildscript {
18-
ext.kotlin_version = '1.4.0'
18+
ext.kotlin_version = '1.4.10'
1919
ext.compose_version = '1.0.0-alpha03'
2020

2121
repositories {
@@ -24,7 +24,7 @@ buildscript {
2424
}
2525

2626
dependencies {
27-
classpath 'com.android.tools.build:gradle:4.2.0-alpha11'
27+
classpath 'com.android.tools.build:gradle:4.2.0-alpha13'
2828
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
2929
}
3030
}
@@ -50,4 +50,20 @@ subprojects {
5050
licenseHeaderFile rootProject.file('spotless/copyright.kt')
5151
}
5252
}
53+
}
54+
55+
// JetNews uses Compose alpha03 and Android Gradle Plugin 4.2.0-alpha13 which are incompatible
56+
// TODO: Remove this workaround when updating to >alpha04
57+
subprojects {
58+
configurations.configureEach {
59+
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
60+
def group = details.requested.group
61+
def module = details.requested.module.name
62+
def version = details.requested.version
63+
64+
if (group == 'androidx.compose.compiler' && module == 'compiler') {
65+
details.useTarget("androidx.compose:compose-compiler:$version")
66+
}
67+
}
68+
}
5369
}

Jetcaster/app/build.gradle

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -84,13 +84,7 @@ android {
8484
}
8585

8686
buildFeatures {
87-
// We turn off the Compose feature for now, due to using Compose SNAPSHOTs where the
88-
// Compose compiler artifact has changed artifact group/name.
89-
// Instead we add the compiler manually below in the dependencies {}. Also see
90-
// the root build.gradle for info on how to apply the plugin.
91-
// TODO: remove this once we upgrade to an AGP version which uses the new artifact details
92-
93-
// compose true
87+
compose true
9488
}
9589

9690
composeOptions {
@@ -108,8 +102,6 @@ dependencies {
108102

109103
implementation Libs.AndroidX.Lifecycle.viewmodel
110104

111-
kotlinCompilerPlugin Libs.AndroidX.Compose.compiler
112-
113105
implementation Libs.AndroidX.Compose.foundation
114106
implementation Libs.AndroidX.Compose.material
115107
implementation Libs.AndroidX.Compose.materialIconsExtended

Jetcaster/build.gradle

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,7 @@ subprojects {
6464
}
6565
}
6666

67-
// Create a configuration which allows us to intercept the JARs, and add them to
68-
// Kotlin Compiler freeCompilerArgs. This is needed because we can't currently use the
69-
// built-in `compose` feature in AGP, since it depends on the old Compose Compiler artifacts.
70-
// TODO: Remove this once AGP uses the new Compose Compiler artifact name
71-
def compilerPluginConfig = project.configurations.create("kotlinCompilerPlugin")
72-
73-
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach { compile ->
67+
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
7468
kotlinOptions {
7569
// Treat all Kotlin warnings as errors
7670
allWarningsAsErrors = true
@@ -87,16 +81,5 @@ subprojects {
8781
// Set JVM target to 1.8
8882
jvmTarget = "1.8"
8983
}
90-
91-
compile.dependsOn(compilerPluginConfig)
92-
compile.doFirst {
93-
if (!compilerPluginConfig.isEmpty()) {
94-
// Add the compiler plugin JARs using the -Xplugin flag
95-
compile.kotlinOptions.freeCompilerArgs +=
96-
"-Xplugin=${compilerPluginConfig.files.first()}"
97-
// Need to turn on the IR compiler too
98-
compile.kotlinOptions.useIR = true
99-
}
100-
}
10184
}
10285
}

Jetcaster/buildSrc/src/main/java/com/example/jetcaster/buildsrc/dependencies.kt

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@ object Versions {
2121
}
2222

2323
object Libs {
24-
const val androidGradlePlugin = "com.android.tools.build:gradle:4.2.0-alpha12"
24+
const val androidGradlePlugin = "com.android.tools.build:gradle:4.2.0-alpha13"
2525
const val jdkDesugar = "com.android.tools:desugar_jdk_libs:1.0.9"
2626

2727
const val junit = "junit:junit:4.13"
2828

2929
const val material = "com.google.android.material:material:1.1.0"
3030

3131
object Accompanist {
32-
private const val version = "0.2.3.compose-6860046-SNAPSHOT"
32+
private const val version = "0.3.0"
3333
const val coil = "dev.chrisbanes.accompanist:accompanist-coil:$version"
3434
}
3535

@@ -61,10 +61,8 @@ object Libs {
6161
const val coreKtx = "androidx.core:core-ktx:1.5.0-alpha02"
6262

6363
object Compose {
64-
const val snapshot = "6860046"
65-
const val version = "1.0.0-SNAPSHOT"
66-
67-
const val compiler = "androidx.compose.compiler:compiler:$version"
64+
const val snapshot = ""
65+
const val version = "1.0.0-alpha04"
6866

6967
const val runtime = "androidx.compose.runtime:runtime:$version"
7068
const val foundation = "androidx.compose.foundation:foundation:${version}"

Jetchat/app/build.gradle

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,7 @@ android {
6666
}
6767

6868
buildFeatures {
69-
// We turn off the Compose feature for now, due to using Compose SNAPSHOTs where the
70-
// Compose compiler artifact has changed artifact group/name.
71-
// Instead we add the compiler manually below in the dependencies {}. Also see
72-
// the root build.gradle for info on how to apply the plugin.
73-
// TODO: remove this once we upgrade to an AGP version which uses the new artifact details
74-
75-
// compose true
69+
compose true
7670
}
7771

7872
composeOptions {
@@ -86,10 +80,6 @@ dependencies {
8680
implementation Libs.Kotlin.stdlib
8781
implementation Libs.Coroutines.android
8882

89-
// Temporary workaround (see above)
90-
// TODO: remove Compose.compiler once we upgrade to an AGP version which uses the new artifact details
91-
kotlinCompilerPlugin Libs.AndroidX.Compose.compiler
92-
9383
implementation Libs.AndroidX.coreKtx
9484
implementation Libs.AndroidX.appcompat
9585
implementation Libs.AndroidX.Navigation.fragment

Jetchat/build.gradle

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -60,25 +60,8 @@ subprojects {
6060
licenseHeaderFile rootProject.file('spotless/copyright.kt')
6161
}
6262
}
63-
// Create a configuration which allows us to intercept the JARs, and add them to
64-
// Kotlin Compiler freeCompilerArgs. This is needed because we can't currently use the
65-
// built-in `compose` feature in AGP, since it depends on the old Compose Compiler artifacts.
66-
// TODO: Remove this once AGP uses the new Compose Compiler artifact name
67-
def compilerPluginConfig = project.configurations.create("kotlinCompilerPlugin")
68-
69-
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach { compile ->
70-
71-
compile.dependsOn(compilerPluginConfig)
72-
compile.doFirst {
73-
if (!compilerPluginConfig.isEmpty()) {
74-
// Add the compiler plugin JARs using the -Xplugin flag
75-
compile.kotlinOptions.freeCompilerArgs +=
76-
"-Xplugin=${compilerPluginConfig.files.first()}"
77-
// Need to turn on the IR compiler too
78-
compile.kotlinOptions.useIR = true
79-
}
80-
}
8163

64+
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
8265
kotlinOptions {
8366
// Treat all Kotlin warnings as errors
8467
allWarningsAsErrors = true

0 commit comments

Comments
 (0)