Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
12 changes: 7 additions & 5 deletions apps/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,13 @@ task assembleAllApps() {

apply from: '../gradle/jacoco.gradle'

configurations.all{
resolutionStrategy {
eachDependency { details ->
if ('org.jacoco' == details.requested.group) {
details.useVersion "0.8.7"
configurations.configureEach {
if (canBeResolved) {
resolutionStrategy {
eachDependency { details ->
if ('org.jacoco' == details.requested.group) {
details.useVersion "0.8.7"
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion apps/buildSrc/src/main/java/MergePrivateData.kt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ object PrivateData {
val dataDir = File(baseDir, dataDirName).canonicalFile

println("")
println("============= MERGE PRIVATE FILES: ${dataDirName.toUpperCase()} ".padEnd(PRINT_PAD_SIZE, '='))
println("============= MERGE PRIVATE FILES: ${dataDirName.uppercase()} ".padEnd(PRINT_PAD_SIZE, '='))

/* Confirm dir exists */
if (!dataDir.exists() || !dataDir.isDirectory) {
Expand Down
30 changes: 16 additions & 14 deletions apps/parent/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ plugins {
id 'org.jetbrains.kotlin.plugin.compose'
}

configurations {
all*.exclude group: 'commons-logging', module: 'commons-logging'
all*.exclude group: 'org.apache.httpcomponents', module: 'httpclient'
configurations.configureEach {
exclude group: 'commons-logging', module: 'commons-logging'
exclude group: 'org.apache.httpcomponents', module: 'httpclient'
}

def coverageEnabled = project.hasProperty('coverage')
Expand Down Expand Up @@ -123,17 +123,19 @@ android {
}
}

configurations.all {
resolutionStrategy.force 'com.google.code.findbugs:jsr305:1.3.9'
/*
Resolves dependency versions across test and production APKs, specifically, transitive
dependencies. This is required since Espresso internally has a dependency on support-annotations.
https://github.com/googlecodelabs/android-testing/blob/57852eaf7df88ddaf828eca879a407f2249d5348/app/build.gradle#L86
*/
resolutionStrategy.force Libs.ANDROIDX_ANNOTATION

resolutionStrategy.force Libs.KOTLIN_COROUTINES_CORE
resolutionStrategy.force Libs.KOTLIN_STD_LIB
configurations.configureEach {
if (canBeResolved) {
resolutionStrategy.force 'com.google.code.findbugs:jsr305:1.3.9'
/*
Resolves dependency versions across test and production APKs, specifically, transitive
dependencies. This is required since Espresso internally has a dependency on support-annotations.
https://github.com/googlecodelabs/android-testing/blob/57852eaf7df88ddaf828eca879a407f2249d5348/app/build.gradle#L86
*/
resolutionStrategy.force Libs.ANDROIDX_ANNOTATION

resolutionStrategy.force Libs.KOTLIN_COROUTINES_CORE
resolutionStrategy.force Libs.KOTLIN_STD_LIB
}
}

configurations.implementation.dependencies.each { compileDependency ->
Expand Down
2 changes: 0 additions & 2 deletions apps/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ include ':canvas-api-2'
include ':dataseedingapi'
include ':espresso'
include ':interactions'
include ":jazzyviewpager"
include ':login-api-2'
include ':pandautils'
include ':rceditor'
Expand All @@ -37,7 +36,6 @@ project(':canvas-api-2').projectDir = new File(rootProject.projectDir, '/../libs
project(':dataseedingapi').projectDir = new File(rootProject.projectDir, '/../automation/dataseedingapi')
project(':espresso').projectDir = new File(rootProject.projectDir, '/../automation/espresso')
project(':interactions').projectDir = new File(rootProject.projectDir, '/../libs/interactions')
project(':jazzyviewpager').projectDir = new File(rootProject.projectDir, '/../libs/jazzyviewpager')
project(':login-api-2').projectDir = new File(rootProject.projectDir, '/../libs/login-api-2')
project(':pandautils').projectDir = new File(rootProject.projectDir, '/../libs/pandautils')
project(':rceditor').projectDir = new File(rootProject.projectDir, '/../libs/rceditor')
Expand Down
30 changes: 16 additions & 14 deletions apps/student/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ apply plugin: 'org.jetbrains.kotlin.plugin.compose'
def updatePriority = 2
def coverageEnabled = project.hasProperty('coverage')

configurations {
all*.exclude group: 'commons-logging', module: 'commons-logging'
all*.exclude group: 'org.apache.httpcomponents', module: 'httpclient'
configurations.configureEach {
exclude group: 'commons-logging', module: 'commons-logging'
exclude group: 'org.apache.httpcomponents', module: 'httpclient'
}

android {
Expand Down Expand Up @@ -166,17 +166,19 @@ android {
testOptions.unitTests.includeAndroidResources = true
testOptions.animationsDisabled = true

configurations.all {
resolutionStrategy.force 'com.google.code.findbugs:jsr305:1.3.9'
/*
Resolves dependency versions across test and production APKs, specifically, transitive
dependencies. This is required since Espresso internally has a dependency on support-annotations.
https://github.com/googlecodelabs/android-testing/blob/57852eaf7df88ddaf828eca879a407f2249d5348/app/build.gradle#L86
*/
resolutionStrategy.force Libs.ANDROIDX_ANNOTATION

resolutionStrategy.force Libs.KOTLIN_COROUTINES_CORE
resolutionStrategy.force Libs.KOTLIN_STD_LIB
configurations.configureEach {
if (canBeResolved) {
resolutionStrategy.force 'com.google.code.findbugs:jsr305:1.3.9'
/*
Resolves dependency versions across test and production APKs, specifically, transitive
dependencies. This is required since Espresso internally has a dependency on support-annotations.
https://github.com/googlecodelabs/android-testing/blob/57852eaf7df88ddaf828eca879a407f2249d5348/app/build.gradle#L86
*/
resolutionStrategy.force Libs.ANDROIDX_ANNOTATION

resolutionStrategy.force Libs.KOTLIN_COROUTINES_CORE
resolutionStrategy.force Libs.KOTLIN_STD_LIB
}
}

/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import com.instructure.canvas.espresso.mockcanvas.addCoursePermissions
import com.instructure.canvas.espresso.mockcanvas.addRecipientsToCourse
import com.instructure.canvas.espresso.mockcanvas.fakes.FakeAssignmentDetailsManager
import com.instructure.canvas.espresso.mockcanvas.fakes.FakeCommentLibraryManager
import com.instructure.canvas.espresso.mockcanvas.fakes.FakeDashboardCoursesManager
import com.instructure.canvas.espresso.mockcanvas.fakes.FakeInboxSettingsManager
import com.instructure.canvas.espresso.mockcanvas.fakes.FakePostPolicyManager
import com.instructure.canvas.espresso.mockcanvas.fakes.FakeRecentGradedSubmissionsManager
Expand All @@ -42,6 +43,7 @@ import com.instructure.canvasapi2.managers.InboxSettingsManager
import com.instructure.canvasapi2.managers.PostPolicyManager
import com.instructure.canvasapi2.managers.SubmissionRubricManager
import com.instructure.canvasapi2.managers.graphql.AssignmentDetailsManager
import com.instructure.canvasapi2.managers.graphql.DashboardCoursesManager
import com.instructure.canvasapi2.managers.graphql.RecentGradedSubmissionsManager
import com.instructure.canvasapi2.managers.graphql.SubmissionCommentsManager
import com.instructure.canvasapi2.managers.graphql.SubmissionContentManager
Expand Down Expand Up @@ -111,6 +113,10 @@ class StudentInboxComposeInteractionTest: InboxComposeInteractionTest() {
@JvmField
val recentGradedSubmissionsManager: RecentGradedSubmissionsManager = FakeRecentGradedSubmissionsManager()

@BindValue
@JvmField
val dashboardCoursesManager: DashboardCoursesManager = FakeDashboardCoursesManager()

override fun goToInboxCompose(data: MockCanvas) {
val parent = data.parents.first()
val token = data.tokenFor(parent)!!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import com.instructure.canvas.espresso.common.interaction.InboxSignatureInteract
import com.instructure.canvas.espresso.mockcanvas.MockCanvas
import com.instructure.canvas.espresso.mockcanvas.fakes.FakeAssignmentDetailsManager
import com.instructure.canvas.espresso.mockcanvas.fakes.FakeCommentLibraryManager
import com.instructure.canvas.espresso.mockcanvas.fakes.FakeDashboardCoursesManager
import com.instructure.canvas.espresso.mockcanvas.fakes.FakeInboxSettingsManager
import com.instructure.canvas.espresso.mockcanvas.fakes.FakePostPolicyManager
import com.instructure.canvas.espresso.mockcanvas.fakes.FakeRecentGradedSubmissionsManager
Expand All @@ -38,6 +39,7 @@ import com.instructure.canvasapi2.managers.InboxSettingsManager
import com.instructure.canvasapi2.managers.PostPolicyManager
import com.instructure.canvasapi2.managers.SubmissionRubricManager
import com.instructure.canvasapi2.managers.graphql.AssignmentDetailsManager
import com.instructure.canvasapi2.managers.graphql.DashboardCoursesManager
import com.instructure.canvasapi2.managers.graphql.RecentGradedSubmissionsManager
import com.instructure.canvasapi2.managers.graphql.SubmissionCommentsManager
import com.instructure.canvasapi2.managers.graphql.SubmissionContentManager
Expand Down Expand Up @@ -97,6 +99,10 @@ class StudentInboxSignatureInteractionTest : InboxSignatureInteractionTest() {
@JvmField
val recentGradedSubmissionsManager: RecentGradedSubmissionsManager = FakeRecentGradedSubmissionsManager()

@BindValue
@JvmField
val dashboardCoursesManager: DashboardCoursesManager = FakeDashboardCoursesManager()

private val leftSideNavigationDrawerPage = LeftSideNavigationDrawerPage()

override val activityRule = StudentActivityTestRule(LoginActivity::class.java)
Expand Down
12 changes: 7 additions & 5 deletions apps/teacher/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -156,13 +156,15 @@ android {
}
}

configurations.all {
resolutionStrategy {
force 'android.arch.lifecycle:runtime:1.0.3'
configurations.configureEach {
if (canBeResolved) {
resolutionStrategy {
force 'android.arch.lifecycle:runtime:1.0.3'

force Libs.KOTLIN_COROUTINES_CORE
force Libs.KOTLIN_COROUTINES_CORE

force Libs.KOTLIN_STD_LIB
force Libs.KOTLIN_STD_LIB
}
}
}

Expand Down
6 changes: 4 additions & 2 deletions automation/dataseedingapi/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ apply plugin: 'java'
apply plugin: 'kotlin'
apply plugin: 'com.apollographql.apollo'

sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

buildscript {
repositories {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/*
* Copyright (C) 2026 - present Instructure, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.instructure.canvas.espresso.mockcanvas.fakes

import com.instructure.canvasapi2.CourseAnnouncementsQuery
import com.instructure.canvasapi2.DashboardCoursesQuery
import com.instructure.canvasapi2.DashboardSingleCourseQuery
import com.instructure.canvasapi2.managers.graphql.DashboardCoursesManager

class FakeDashboardCoursesManager : DashboardCoursesManager {

override suspend fun getDashboardCourses(
forceNetwork: Boolean
): DashboardCoursesQuery.Data {
return DashboardCoursesQuery.Data(allCourses = emptyList())
}

override suspend fun getSingleCourse(
courseId: Long,
forceNetwork: Boolean
): DashboardSingleCourseQuery.Data {
return DashboardSingleCourseQuery.Data(course = null)
}

override suspend fun getCourseAnnouncements(
courseId: Long,
cursor: String?,
forceNetwork: Boolean
): CourseAnnouncementsQuery.Data {
return CourseAnnouncementsQuery.Data(course = null)
}
}
8 changes: 4 additions & 4 deletions gradle/jacoco.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -186,11 +186,11 @@ task jacocoFullReport(type: JacocoReport, group: 'Coverage reports') {
reports {
html {
required = true
destination file('build/reports/jacoco/html')
outputLocation = file('build/reports/jacoco/html')
}
csv {
required = true
destination file('build/reports/jacoco/jacocoFullReport.csv')
outputLocation = file('build/reports/jacoco/jacocoFullReport.csv')
}
}
}
Expand Down Expand Up @@ -218,11 +218,11 @@ task jacocoFullCombinedReport(type: JacocoReport, group: 'Coverage reports') {
reports {
html {
required = true
destination file('build/reports/jacoco/html')
outputLocation = file('build/reports/jacoco/html')
}
csv {
required = true
destination file('build/reports/jacoco/jacocoFullCombinedReport.csv')
outputLocation = file('build/reports/jacoco/jacocoFullCombinedReport.csv')
}
}
}
6 changes: 4 additions & 2 deletions libs/annotations/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,10 @@ android {
targetCompatibility JavaVersion.VERSION_17
}

configurations.all {
resolutionStrategy.force 'com.getkeepsafe.relinker:relinker:1.4.3'
configurations.configureEach {
if (canBeResolved) {
resolutionStrategy.force 'com.getkeepsafe.relinker:relinker:1.4.3'
}
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#
# Copyright (C) 2026 - present Instructure, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

query CourseAnnouncementsQuery($courseId: ID!, $pageSize: Int!, $cursor: String) {
course: legacyNode(_id: $courseId, type: Course) {
... on Course {
_id
announcements: discussionsConnection(
first: $pageSize
after: $cursor
filter: { isAnnouncement: true }
) {
pageInfo {
hasNextPage
endCursor
}
nodes {
_id
title
message
postedAt
participant {
read
}
entryCounts {
unreadCount
}
}
}
}
}
}
Loading
Loading