Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
[JetNews] bump to alpha06
  • Loading branch information
objcode committed Oct 27, 2020
commit 8ff36874576ad08a47b6debaaa16e052777cd6e0
2 changes: 1 addition & 1 deletion JetNews/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ dependencies {
implementation "androidx.lifecycle:lifecycle-viewmodel-savedstate:2.3.0-beta01"
implementation "androidx.lifecycle:lifecycle-livedata-ktx:2.3.0-beta01"

androidTestImplementation 'junit:junit:4.13'
androidTestImplementation 'junit:junit:4.13.1'
androidTestImplementation 'androidx.test:rules:1.3.0'
androidTestImplementation 'androidx.test:runner:1.3.0'
androidTestImplementation "androidx.ui:ui-test:$compose_version"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import org.junit.Test
class HomeScreenSnackbarTest {

@get:Rule
val composeTestRule = createComposeRule(disableTransitions = true)
val composeTestRule = createComposeRule()

@OptIn(
ExperimentalMaterialApi::class,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import org.junit.Test
class JetnewsUiTest {

@get:Rule
val composeTestRule = createComposeRule(disableTransitions = true)
val composeTestRule = createComposeRule()

@Before
fun setUp() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ package com.example.jetnews.ui.article
import android.content.Context
import android.content.Intent
import androidx.compose.foundation.AmbientContentColor
import androidx.compose.foundation.Icon
import androidx.compose.foundation.Text
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.preferredHeight
import androidx.compose.material.AlertDialog
import androidx.compose.material.Icon
import androidx.compose.material.IconButton
import androidx.compose.material.MaterialTheme
import androidx.compose.material.Scaffold
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ private fun BulletParagraph(
Box(
modifier = Modifier
.preferredSize(8.sp.toDp(), 8.sp.toDp())
.alignWithSiblings {
.alignBy {
// Add an alignment "baseline" 1sp below the bottom of the circle
9.sp.toIntPx()
}
Expand All @@ -224,7 +224,7 @@ private fun BulletParagraph(
Text(
modifier = Modifier
.weight(1f)
.alignWithSiblings(FirstBaseline),
.alignBy(FirstBaseline),
text = text,
style = textStyle.merge(paragraphStyle)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

package com.example.jetnews.ui.home

import androidx.compose.foundation.Icon
import androidx.compose.foundation.ScrollableColumn
import androidx.compose.foundation.ScrollableRow
import androidx.compose.foundation.Text
Expand All @@ -33,6 +32,7 @@ import androidx.compose.material.CircularProgressIndicator
import androidx.compose.material.Divider
import androidx.compose.material.DrawerValue
import androidx.compose.material.ExperimentalMaterialApi
import androidx.compose.material.Icon
import androidx.compose.material.IconButton
import androidx.compose.material.MaterialTheme
import androidx.compose.material.ProvideEmphasis
Expand Down
14 changes: 4 additions & 10 deletions JetNews/app/src/main/java/com/example/jetnews/ui/home/PostCards.kt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

package com.example.jetnews.ui.home

import androidx.compose.foundation.Icon
import androidx.compose.foundation.Image
import androidx.compose.foundation.Text
import androidx.compose.foundation.clickable
Expand All @@ -26,6 +25,7 @@ import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.preferredSize
import androidx.compose.material.AmbientEmphasisLevels
import androidx.compose.material.Icon
import androidx.compose.material.IconToggleButton
import androidx.compose.material.MaterialTheme
import androidx.compose.material.ProvideEmphasis
Expand Down Expand Up @@ -131,7 +131,7 @@ fun PostCardHistory(post: Post, navigateTo: (Screen) -> Unit) {
)
}
ProvideEmphasis(AmbientEmphasisLevels.current.medium) {
Icon(asset = Icons.Filled.MoreVert)
Icon(Icons.Filled.MoreVert)
}
}
}
Expand All @@ -148,15 +148,9 @@ fun BookmarkButton(
) {
modifier.fillMaxSize()
if (isBookmarked) {
Icon(
asset = Icons.Filled.Bookmark,
modifier = modifier
)
Icon(asset = Icons.Filled.Bookmark)
} else {
Icon(
asset = Icons.Filled.BookmarkBorder,
modifier = modifier
)
Icon(asset = Icons.Filled.BookmarkBorder)
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

package com.example.jetnews.ui.interests

import androidx.compose.foundation.Icon
import androidx.compose.foundation.Image
import androidx.compose.foundation.ScrollableColumn
import androidx.compose.foundation.Text
Expand All @@ -30,6 +29,7 @@ import androidx.compose.foundation.selection.toggleable
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material.Divider
import androidx.compose.material.DrawerValue
import androidx.compose.material.Icon
import androidx.compose.material.IconButton
import androidx.compose.material.MaterialTheme
import androidx.compose.material.Scaffold
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@

package com.example.jetnews.ui.interests

import androidx.compose.foundation.Icon
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.preferredSize
import androidx.compose.foundation.shape.CircleShape
import androidx.compose.material.AmbientEmphasisLevels
import androidx.compose.material.Icon
import androidx.compose.material.MaterialTheme
import androidx.compose.material.ProvideEmphasis
import androidx.compose.material.Surface
Expand Down
8 changes: 6 additions & 2 deletions JetNews/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@

buildscript {
ext.kotlin_version = '1.4.10'
ext.compose_version = '1.0.0-alpha05'
ext.compose_version = '1.0.0-SNAPSHOT'

repositories {
google()
jcenter()
}

dependencies {
classpath 'com.android.tools.build:gradle:4.2.0-alpha13'
classpath 'com.android.tools.build:gradle:4.2.0-alpha15'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
Expand All @@ -35,6 +35,10 @@ plugins {

subprojects {
repositories {
maven {
def snapshot = "6922857"
url "https://androidx.dev/snapshots/builds/$snapshot/artifacts/repository/"
}
google()
jcenter()
}
Expand Down
4 changes: 2 additions & 2 deletions JetNews/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Wed Sep 16 10:20:00 PDT 2020
#Tue Oct 27 16:21:59 PDT 2020
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-6.6.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME