Skip to content

Commit

Permalink
Merge pull request #36 from c0de-wizard/shared-restructure
Browse files Browse the repository at this point in the history
Shared module restructure
  • Loading branch information
thomaskioko authored Mar 19, 2022
2 parents fc7ce84 + 4388326 commit 7a199f2
Show file tree
Hide file tree
Showing 210 changed files with 1,987 additions and 816 deletions.
35 changes: 20 additions & 15 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,32 +14,37 @@ jobs:
env:
TMDB_API_KEY: ${{ secrets.TMDB_API_KEY }}
TMDB_API_URL: ${{ secrets.TMDB_API_URL }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

steps:
- name: Generate build number
shell: bash
run: echo "BUILD_NUMBER=$(( $GITHUB_RUN_NUMBER + 6000 + (($GITHUB_RUN_NUMBER - 980) * 3) ))" >> $GITHUB_ENV

- uses: actions/checkout@v2

- name: Set Up JDK
uses: actions/setup-java@v1
with:
java-version: 11

- uses: actions/checkout@v2

- name: Add App Secrets
run: |
echo -e "\TMDB_API_KEY=$TMDB_API_KEY" >> ./local.properties
echo -e "\TMDB_API_URL=$TMDB_API_URL" >> ./local.properties
echo -e "\TMDB_API_KEY=$TMDB_API_KEY" >> ./local.properties
echo -e "\TMDB_API_URL=$TMDB_API_URL" >> ./local.properties
- name: Build all artifacts
id: buildAllApks
uses: eskatos/[email protected]
- uses: burrunan/gradle-cache-action@v1
name: Build and check
env:
ORG_GRADLE_PROJECT_TVMANIAC_VERSIONCODE: ${{ env.BUILD_NUMBER }}
with:
gradle-version: current
wrapper-cache-enabled: true
dependencies-cache-enabled: true
configuration-cache-enabled: true
arguments: assembleDebug

- name: Unit Tests
run: ./gradlew testDebugUnitTest
gradle-dependencies-cache-key: |
gradle/libs.versions.toml
arguments: |
bundle
detekt
testDebugUnitTest
assembleDebug
- name: Create release
uses: softprops/action-gh-release@v1
Expand Down
117 changes: 117 additions & 0 deletions .idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions .idea/codeStyles/codeStyleConfig.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions app-common/annotations/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ plugins {

android {
compileSdk = libs.versions.android.compile.get().toInt()
namespace = "com.thomaskioko.tvmaniac.annotations"

defaultConfig {
minSdk = libs.versions.android.min.get().toInt()
Expand Down
2 changes: 0 additions & 2 deletions app-common/annotations/src/main/AndroidManifest.xml

This file was deleted.

3 changes: 2 additions & 1 deletion app-common/compose/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@ plugins {
`android-compose-plugin`
}

dependencies {
android {
namespace = "com.thomaskioko.tvmaniac.compose"
}
4 changes: 0 additions & 4 deletions app-common/compose/src/main/AndroidManifest.xml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
package com.thomaskioko.tvmaniac.compose.components

import androidx.compose.foundation.Image
import androidx.compose.foundation.border
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material.ContentAlpha
import androidx.compose.material.ExtendedFloatingActionButton
import androidx.compose.material.FloatingActionButtonDefaults
import androidx.compose.material.LocalContentAlpha
import androidx.compose.material.MaterialTheme
import androidx.compose.material.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.CompositionLocalProvider
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.ColorFilter
import androidx.compose.ui.graphics.RectangleShape
import androidx.compose.ui.graphics.painter.Painter
import androidx.compose.ui.unit.dp

@Composable
fun ExtendedFab(
painter: Painter,
text: String,
onClick: () -> Unit = {}
) {
ExtendedFloatingActionButton(
icon = {
Image(
painter = painter,
contentDescription = null,
colorFilter = ColorFilter.tint(MaterialTheme.colors.secondary.copy(alpha = 0.8F)),
)
},
text = {
CompositionLocalProvider(LocalContentAlpha provides ContentAlpha.medium) {
Text(
text = text,
style = MaterialTheme.typography.body2,
)
}
},
shape = RectangleShape,
backgroundColor = Color.Transparent,
elevation = FloatingActionButtonDefaults.elevation(0.dp),
onClick = { onClick() },
modifier = Modifier
.padding(2.dp)
.border(1.dp, Color(0xFF414141), RoundedCornerShape(8.dp))
)
}

This file was deleted.

Loading

0 comments on commit 7a199f2

Please sign in to comment.