Skip to content

Commit 4e4ad10

Browse files
authored
[RunAllTests] Fixes #2961: Prepare release-0.5 branch for alpha MR2 (#3117)
* Prepare release-0.5 branch. - Updates version + version code - Disabled question tab - Enables local image/proto loading - Fixes the recommendations graph - Enables app expiration for ~6+ months from now * Remove accidental extra number in Bazel file. * Retrigger CI to account for PR title change.
1 parent 0dbe671 commit 4e4ad10

File tree

6 files changed

+27
-16
lines changed

6 files changed

+27
-16
lines changed

BUILD.bazel

+2-2
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ android_binary(
5555
"applicationId": "org.oppia.android",
5656
"minSdkVersion": "19",
5757
"targetSdkVersion": "29",
58-
"versionCode": "0",
59-
"versionName": "0.1-alpha",
58+
"versionCode": "5",
59+
"versionName": "0.5-alpha-0dbe671eb8",
6060
},
6161
multidex = "native", # TODO(#1875): Re-enable legacy for optimized release builds.
6262
deps = [

app/build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ android {
1212
applicationId "org.oppia.android"
1313
minSdkVersion 19
1414
targetSdkVersion 29
15-
versionCode 1
16-
versionName "1.0"
15+
versionCode 5
16+
versionName "0.5-alpha-0dbe671eb8"
1717
multiDexEnabled true
1818
testInstrumentationRunner "org.oppia.android.testing.OppiaTestRunner"
1919
// https://developer.android.com/training/testing/junit-runner#ato-gradle

app/src/main/AndroidManifest.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@
2222
android:value="false" />
2323
<meta-data
2424
android:name="automatic_app_expiration_enabled"
25-
android:value="false" />
25+
android:value="true" />
2626
<meta-data
2727
android:name="expiration_date"
28-
android:value="2020-09-01" />
28+
android:value="2021-10-31" />
2929

3030
<activity
3131
android:name=".app.administratorcontrols.AdministratorControlsActivity"

app/src/main/java/org/oppia/android/app/topic/PracticeTabModule.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ import dagger.Provides
88
class PracticeTabModule {
99
@Provides
1010
@EnablePracticeTab
11-
fun provideEnablePracticeTab(): Boolean = true
11+
fun provideEnablePracticeTab(): Boolean = false
1212
}

domain/src/main/java/org/oppia/android/domain/topic/TopicListController.kt

+18-7
Original file line numberDiff line numberDiff line change
@@ -444,6 +444,15 @@ class TopicListController @Inject constructor(
444444
return TimeUnit.MILLISECONDS.toDays(oppiaClock.getCurrentTimeMs() - this.lastPlayedTimestamp)
445445
}
446446

447+
private val REAL_PLACE_VALUES_TOPIC_ID = "iX9kYCjnouWN"
448+
private val REAL_MULTIPLICATION_TOPIC_ID = "C4fqwrvqWpRm"
449+
private val REAL_FRACTIONS_TOPIC_ID = "0abdeaJhmfPm"
450+
private val REAL_RATIOS_TOPIC_ID = "5g0nxGUmx5J5"
451+
452+
// Not yet released/available to the app (and thus shouldn't be dependencies below since they can't be played).
453+
private val REAL_DIVISION_TOPIC_ID = "qW12maD4hiA8"
454+
private val REAL_ADDITION_AND_SUBTRACTION_TOPIC_ID = "sWBXKH4PZcK6"
455+
447456
// TODO(#2550): Remove hardcoded order of topics. Compute list of suggested stories from backend structures
448457
/**
449458
* Returns a list of topic IDs for which the specified topic ID expects to be completed before
@@ -453,17 +462,19 @@ class TopicListController @Inject constructor(
453462
// The comments describe the correct dependencies, but those might not be available until the
454463
// topic is introduced into the app.
455464
return when (topicId) {
456-
// TEST_TOPIC_ID_0 (depends on Fractions)
457-
TEST_TOPIC_ID_0 -> listOf(FRACTIONS_TOPIC_ID)
458-
// TEST_TOPIC_ID_1 (depends on TEST_TOPIC_ID_0,Ratios)
459-
TEST_TOPIC_ID_1 -> listOf(TEST_TOPIC_ID_0, RATIOS_TOPIC_ID)
465+
// Place values depends on nothing since it's the first set of lessons to play.
466+
REAL_PLACE_VALUES_TOPIC_ID -> listOf()
460467
// Fractions (depends on A+S, Multiplication, Division)
461-
FRACTIONS_TOPIC_ID -> listOf()
468+
REAL_FRACTIONS_TOPIC_ID -> listOf(REAL_MULTIPLICATION_TOPIC_ID)
462469
// Ratios (depends on A+S, Multiplication, Division)
463-
RATIOS_TOPIC_ID -> listOf()
470+
REAL_RATIOS_TOPIC_ID -> listOf(REAL_MULTIPLICATION_TOPIC_ID)
464471
// Addition and Subtraction (depends on Place Values)
465-
// Multiplication (depends on Addition and Subtraction)
472+
REAL_ADDITION_AND_SUBTRACTION_TOPIC_ID -> listOf(REAL_PLACE_VALUES_TOPIC_ID)
473+
// Multiplication (depends on Addition and Subtraction); depend instead on Place Values as a
474+
// poor proxy for A+S since that topic isn't yet available in the app.
475+
REAL_MULTIPLICATION_TOPIC_ID -> listOf(REAL_PLACE_VALUES_TOPIC_ID)
466476
// Division (depends on Multiplication)
477+
REAL_DIVISION_TOPIC_ID -> listOf(REAL_MULTIPLICATION_TOPIC_ID)
467478
// Expressions and Equations (depends on A+S, Multiplication, Division)
468479
// Decimals (depends on A+S, Multiplication, Division)
469480
else -> listOf()

utility/src/main/java/org/oppia/android/util/caching/CachingModule.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ class CachingModule {
1919

2020
@Provides
2121
@LoadLessonProtosFromAssets
22-
fun provideLoadLessonProtosFromAssets(): Boolean = false
22+
fun provideLoadLessonProtosFromAssets(): Boolean = true
2323

2424
@Provides
2525
@LoadImagesFromAssets
26-
fun provideLoadImagesFromAssets(): Boolean = false
26+
fun provideLoadImagesFromAssets(): Boolean = true
2727
}

0 commit comments

Comments
 (0)