Skip to content

Commit

Permalink
Migrate to 6.7.4
Browse files Browse the repository at this point in the history
Signed-off-by: Mohsen Mirhoseini <[email protected]>
  • Loading branch information
Mohsen Mirhoseini committed Dec 18, 2023
1 parent 256713c commit e6364b3
Show file tree
Hide file tree
Showing 15 changed files with 167 additions and 155 deletions.
8 changes: 5 additions & 3 deletions feed_resources/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,18 @@ dependencies {
implementation("androidx.appcompat:appcompat:1.6.1")
implementation("androidx.constraintlayout:constraintlayout:2.1.4")

implementation("com.google.android.material:material:1.9.0")
implementation("com.google.android.material:material:1.11.0")

implementation(platform("org.jetbrains.kotlin:kotlin-bom:1.6.10"))
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")

testImplementation("junit:junit:4.13.2")

// Glide
implementation("com.github.bumptech.glide:glide:4.13.2")
implementation("com.github.bumptech.glide:glide:4.16.0")

// Firework SDK
val fireworkSdkVersion = "6.7.0"
val fireworkSdkVersion = "6.7.4"
implementation("com.firework:sdk:$fireworkSdkVersion")

// Glide (optional image loader)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@ import com.firework.sdk.FireworkSdk
import com.firework.sdk.FireworkSdkConfig

class ExampleApplication : Application() {

override fun onCreate() {
super.onCreate()

// build Firework Android SDK v6 configuration
val config = FireworkSdkConfig.Builder(this)
.checksumRequired(false)
.clientId(FW_CLIENT_ID) // Client OAUTH Id
.userId("example app user ID") // User Id in your eco-system
.imageLoader(GlideImageLoaderFactory.createInstance(this)) // glide, picasso, or your implementation
.build()
val config =
FireworkSdkConfig.Builder(this)
.checksumRequired(false)
.clientId(FW_CLIENT_ID) // Client OAUTH Id
.userId("example app user ID") // User Id in your eco-system
.imageLoader(GlideImageLoaderFactory.createInstance(this)) // glide, picasso, or your implementation
.build()

// initialize Firework Android SDK v6
FireworkSdk.init(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import com.firework.example.feedresources.sku.SkuActivity

class MainActivity : AppCompatActivity() {
private lateinit var binding: ActivityMainBinding

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
binding = ActivityMainBinding.inflate(layoutInflater)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import com.firework.viewoptions.baseOptions
import com.firework.viewoptions.viewOptions

class ChannelActivity : AppCompatActivity() {

private lateinit var binding: ActivityChannelBinding

override fun onCreate(savedInstanceState: Bundle?) {
Expand All @@ -38,11 +37,12 @@ class ChannelActivity : AppCompatActivity() {
private fun initVideoFeedView() {
val videoFeedView = binding.fwVideoFeedView

val viewOptions = viewOptions {
baseOptions {
feedResource(FeedResource.Channel(channelId = FW_CHANNEL_ID))
val viewOptions =
viewOptions {
baseOptions {
feedResource(FeedResource.Channel(channelId = FW_CHANNEL_ID))
}
}
}

videoFeedView.init(viewOptions)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,12 @@ class ChannelHashtagsActivity : AppCompatActivity() {
private fun initVideoFeedView() {
val videoFeedView = binding.fwVideoFeedView

val viewOptions = viewOptions {
baseOptions {
feedResource(FeedResource.ChannelHashtag(channelId = FW_CHANNEL_ID, HASHTAG_FILTER_EXPRESSION))
val viewOptions =
viewOptions {
baseOptions {
feedResource(FeedResource.ChannelHashtag(channelId = FW_CHANNEL_ID, HASHTAG_FILTER_EXPRESSION))
}
}
}

videoFeedView.init(viewOptions)
}
Expand All @@ -56,11 +57,12 @@ class ChannelHashtagsActivity : AppCompatActivity() {
binding.fwVideoFeedView.destroy()
binding.feedContainer.removeAllViews()
val videoFeedView = FwVideoFeedView(this)
val viewOptions = viewOptions {
baseOptions {
feedResource(FeedResource.ChannelHashtag(channelId = FW_CHANNEL_ID, hashTagFilter))
val viewOptions =
viewOptions {
baseOptions {
feedResource(FeedResource.ChannelHashtag(channelId = FW_CHANNEL_ID, hashTagFilter))
}
}
}
binding.feedContainer.addView(videoFeedView)
videoFeedView.init(viewOptions)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import com.firework.viewoptions.baseOptions
import com.firework.viewoptions.viewOptions

class DiscoveryActivity : AppCompatActivity() {

private lateinit var binding: ActivityDiscoveryBinding

override fun onCreate(savedInstanceState: Bundle?) {
Expand All @@ -37,12 +36,13 @@ class DiscoveryActivity : AppCompatActivity() {
private fun initVideoFeedView() {
val videoFeedView = binding.fwVideoFeedView

val viewOptions = viewOptions {
baseOptions {
// Check Channel, Playlist, or Dynamic screens for other feed sources
feedResource(FeedResource.Discovery)
val viewOptions =
viewOptions {
baseOptions {
// Check Channel, Playlist, or Dynamic screens for other feed sources
feedResource(FeedResource.Discovery)
}
}
}

videoFeedView.init(viewOptions)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import com.firework.viewoptions.baseOptions
import com.firework.viewoptions.viewOptions

class DynamicContentActivity : AppCompatActivity() {

private lateinit var binding: ActivityDynamicContentBinding

override fun onCreate(savedInstanceState: Bundle?) {
Expand Down Expand Up @@ -42,11 +41,12 @@ class DynamicContentActivity : AppCompatActivity() {
val categories = listOf("Test category")
val parameters = mapOf("category" to categories)
val feedResource = FeedResource.DynamicContent(channelId = FW_CHANNEL_ID, parameters = parameters)
val viewOptions = viewOptions {
baseOptions {
feedResource(feedResource)
val viewOptions =
viewOptions {
baseOptions {
feedResource(feedResource)
}
}
}
videoFeedView.init(viewOptions)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import com.firework.viewoptions.baseOptions
import com.firework.viewoptions.viewOptions

class PlaylistActivity : AppCompatActivity() {

private lateinit var binding: ActivityPlaylistBinding

override fun onCreate(savedInstanceState: Bundle?) {
Expand All @@ -39,11 +38,12 @@ class PlaylistActivity : AppCompatActivity() {
private fun initVideoFeedView() {
val videoFeedView = binding.fwVideoFeedView

val viewOptions = viewOptions {
baseOptions {
feedResource(FeedResource.Playlist(channelId = FW_CHANNEL_ID, playlistId = FW_PLAYLIST_ID))
val viewOptions =
viewOptions {
baseOptions {
feedResource(FeedResource.Playlist(channelId = FW_CHANNEL_ID, playlistId = FW_PLAYLIST_ID))
}
}
}

videoFeedView.init(viewOptions)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import com.firework.viewoptions.baseOptions
import com.firework.viewoptions.viewOptions

class SingleContentActivity : AppCompatActivity() {

private lateinit var binding: ActivitySingleContentBinding

override fun onCreate(savedInstanceState: Bundle?) {
Expand All @@ -37,12 +36,13 @@ class SingleContentActivity : AppCompatActivity() {
private fun initVideoFeedView() {
val videoFeedView = binding.fwVideoFeedView

val viewOptions = viewOptions {
baseOptions {
// Check Channel, Playlist, or Dynamic screens for other feed sources
feedResource(FeedResource.SingleContent(FW_CONTENT_ID))
val viewOptions =
viewOptions {
baseOptions {
// Check Channel, Playlist, or Dynamic screens for other feed sources
feedResource(FeedResource.SingleContent(FW_CONTENT_ID))
}
}
}

videoFeedView.init(viewOptions)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,12 @@ class SkuActivity : AppCompatActivity() {
private fun initVideoFeedView() {
val videoFeedView = binding.fwVideoFeedView

val viewOptions = viewOptions {
baseOptions {
feedResource(FeedResource.Sku(channelId = FW_CHANNEL_ID, DEFAULT_IDS))
val viewOptions =
viewOptions {
baseOptions {
feedResource(FeedResource.Sku(channelId = FW_CHANNEL_ID, DEFAULT_IDS))
}
}
}

videoFeedView.init(viewOptions)
}
Expand All @@ -57,11 +58,12 @@ class SkuActivity : AppCompatActivity() {
binding.fwVideoFeedView.destroy()
binding.feedContainer.removeAllViews()
val videoFeedView = FwVideoFeedView(this)
val viewOptions = viewOptions {
baseOptions {
feedResource(FeedResource.Sku(channelId = FW_CHANNEL_ID, productIds = skuIds))
val viewOptions =
viewOptions {
baseOptions {
feedResource(FeedResource.Sku(channelId = FW_CHANNEL_ID, productIds = skuIds))
}
}
}
binding.feedContainer.addView(videoFeedView)
videoFeedView.init(viewOptions)
}
Expand Down
10 changes: 5 additions & 5 deletions feed_resources/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
id("com.android.application") version "8.0.2" apply false
id("com.android.library") version "8.0.2" apply false
id("org.jetbrains.kotlin.android") version "1.8.10" apply false
id("org.jlleitschuh.gradle.ktlint") version "11.3.1" apply false
id("io.gitlab.arturbosch.detekt") version "1.22.0" apply false
id("com.android.application") version "8.2.0" apply false
id("com.android.library") version "8.2.0" apply false
id("org.jetbrains.kotlin.android") version "1.9.21" apply false
id("org.jlleitschuh.gradle.ktlint") version "12.0.3" apply false
id("io.gitlab.arturbosch.detekt") version "1.23.4" apply false
}

task<Delete>("clean") {
Expand Down
Binary file modified feed_resources/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion feed_resources/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
12 changes: 8 additions & 4 deletions feed_resources/gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,6 @@ done
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum

Expand Down Expand Up @@ -133,10 +130,13 @@ location of your Java installation."
fi
else
JAVACMD=java
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
if ! command -v java >/dev/null 2>&1
then
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
fi

# Increase the maximum file descriptors if we can.
Expand Down Expand Up @@ -197,6 +197,10 @@ if "$cygwin" || "$msys" ; then
done
fi


# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
Expand Down
Loading

0 comments on commit e6364b3

Please sign in to comment.