Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue #LR-740 chore: Upgraded the scala major version from 2.11 to 2.12 #613

Merged
merged 31 commits into from
Mar 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
b331a51
Issue #LR-740 chore: Upgraded the scala major version from 2.11 to 2.12
AmiableAnil Feb 22, 2024
2a7830c
Issue #LR-740 chore: Upgraded the scala major version from 2.11 to 2.12
AmiableAnil Feb 22, 2024
72411d1
Issue #LR-740 chore: Upgraded the scala major version from 2.11 to 2.12
AmiableAnil Feb 22, 2024
36c34bd
Issue #LR-740 chore: Upgraded the scala major version from 2.11 to 2.12
AmiableAnil Feb 22, 2024
6110854
Issue #LR-740 chore: Upgraded the scala major version from 2.11 to 2.12
AmiableAnil Feb 22, 2024
adfadbd
Issue #LR-740 chore: Upgraded the scala major version from 2.11 to 2.12
AmiableAnil Feb 22, 2024
63c6482
Issue #LR-740 chore: Upgraded the scala major version from 2.11 to 2.12
AmiableAnil Feb 23, 2024
31ab025
Issue #LR-740 chore: Upgraded the scala major version from 2.11 to 2.12
AmiableAnil Feb 23, 2024
bab1259
Issue #LR-676 chore: Updated the learning-service to content service
AmiableAnil Feb 23, 2024
c6877bb
Issue #LR-740 chore: Upgraded the scala major version from 2.11 to 2.12
AmiableAnil Feb 27, 2024
df5d72e
Issue #LR-740 chore: Removed unused dependency
AmiableAnil Feb 27, 2024
cabadc6
Issue #LR-740 chore: Optimized the import
AmiableAnil Feb 27, 2024
38a44a5
Issue #LR-740 chore: Updated the circleci image
AmiableAnil Feb 27, 2024
769ea84
Issue #LR-740 chore: Updated the circleci image
AmiableAnil Feb 27, 2024
8c03f6c
Issue #LR-740 chore: Updated the circleci image
AmiableAnil Feb 27, 2024
741dc7e
Issue #LR-740 chore: Updated the circleci image
AmiableAnil Feb 27, 2024
6e70363
Issue #LR-740 chore: Updated the logback-core
AmiableAnil Feb 29, 2024
7c54dcc
Issue #LR-740 chore: Updated the logback-core
AmiableAnil Feb 29, 2024
9df5af2
Issue #LR-740 chore: Updated the logback-core
AmiableAnil Feb 29, 2024
2308201
Issue #LR-740 chore: Updated the logback-core
AmiableAnil Feb 29, 2024
b331c53
Issue #LR-740 chore: Updated the logback-core
AmiableAnil Feb 29, 2024
a931d87
Issue #LR-740 chore: Added netty-common
AmiableAnil Feb 29, 2024
12d5aca
Issue #LR-740 chore: updated the redisson version
AmiableAnil Feb 29, 2024
8f2c974
Issue #LR-740 chore: updated the redisson version
AmiableAnil Feb 29, 2024
17f5062
Merge branch 'release-8.0.0' of https://github.com/Sunbird-Lern/sunbi…
AmiableAnil Mar 20, 2024
6e61866
Issue #LR-740 chore: Excluded the net buddy.
AmiableAnil Mar 20, 2024
2d337df
Issue #LR-740 chore: Reverted the netty-common changes
AmiableAnil Mar 20, 2024
79ec955
Issue #LR-740 chore: Downgraded the snakeyaml from 2.0 to 1.33
AmiableAnil Mar 20, 2024
4274a91
Issue #LR-740 chore: Fixed the netty issue
AmiableAnil Mar 20, 2024
16dd417
Issue #LR-740 chore: Fixed the netty issue
AmiableAnil Mar 20, 2024
2b6bbb6
Issue #LR-740 chore: Fixed the netty issue
AmiableAnil Mar 20, 2024
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
6 changes: 2 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
version: 2.1
executorType: machine
jobs:
build:
docker:
- image: circleci/openjdk:14-jdk-buster-node-browsers-legacy
- image: circleci/redis:latest
machine:
image: ubuntu-2004:202201-02
steps:
- checkout
- restore_cache:
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.Build
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ ENV M2_HOME /opt/apache-maven-3.3.9
ENV PATH ${M2_HOME}/bin:${PATH}
COPY learner /opt/learner/
WORKDIR /opt/learner/services
RUN mvn clean install -DskipTests -DCLOUD_STORE_GROUP_ID=org.sunbird -DCLOUD_STORE_ARTIFACT_ID=cloud-store-sdk -DCLOUD_STORE_VERSION=1.4.6
RUN mvn clean install -DskipTests -DCLOUD_STORE_GROUP_ID=org.sunbird -DCLOUD_STORE_ARTIFACT_ID=cloud-store-sdk_2.12 -DCLOUD_STORE_VERSION=1.4.7
WORKDIR /opt/learner/services/learning-service
CMD ["mvn", "play2:dist"]
38 changes: 17 additions & 21 deletions course-mw/course-actors-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<slf4j.version>1.6.1</slf4j.version>
<logback.version>1.0.7</logback.version>
</properties>
<dependencies>
<dependency>
Expand All @@ -26,6 +24,11 @@
<artifactId>logback-classic</artifactId>
<version>1.2.3</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId>
<version>1.2.3</version>
</dependency>
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
Expand All @@ -44,13 +47,13 @@
</dependency>
<dependency>
<groupId>com.typesafe.akka</groupId>
<artifactId>akka-actor_2.11</artifactId>
<version>2.5.22</version>
<artifactId>akka-actor_${scala.major.version}</artifactId>
<version>${typesafe.akka.version}</version>
</dependency>
<dependency>
<groupId>com.typesafe.akka</groupId>
<artifactId>akka-slf4j_2.11</artifactId>
<version>2.5.22</version>
<artifactId>akka-slf4j_${scala.major.version}</artifactId>
<version>${typesafe.akka.version}</version>
</dependency>
<dependency>
<groupId>org.sunbird</groupId>
Expand Down Expand Up @@ -80,37 +83,30 @@
</dependency>
<dependency>
<groupId>com.typesafe.akka</groupId>
<artifactId>akka-testkit_2.11</artifactId>
<version>2.5.22</version>
<artifactId>akka-testkit_${scala.major.version}</artifactId>
<version>${typesafe.akka.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.10.1</version>
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.10.1</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.powermock/powermock-api-easymock -->
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>${mockito.core.version}</version>
<scope>test</scope>
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-api-mockito2</artifactId>
<version>${powermock.api.mockito2.version}</version>
<version>${powermock.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-module-junit4</artifactId>
<version>${powermock.module.junit4.version}</version>
<version>${powermock.version}</version>
<scope>test</scope>
</dependency>

Expand Down Expand Up @@ -163,7 +159,7 @@
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.5</version>
<version>${jacoco-maven-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand All @@ -176,7 +172,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M4</version>
<version>3.0.0</version>
<configuration>
<!-- <skipTests>true</skipTests> -->
<includes>
Expand Down
30 changes: 13 additions & 17 deletions course-mw/course-actors/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,21 @@
</parent>
<artifactId>course-actors</artifactId>
<name>Course</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.2.3</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId>
<version>1.2.3</version>
</dependency>
<dependency>
<groupId>net.logstash.logback</groupId>
<artifactId>logstash-logback-encoder</artifactId>
<version>6.3</version>
<version>6.6</version>
</dependency>
<dependency>
<groupId>org.sunbird</groupId>
Expand All @@ -32,32 +34,26 @@
</dependency>
<dependency>
<groupId>com.typesafe.akka</groupId>
<artifactId>akka-testkit_2.11</artifactId>
<version>2.5.22</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>${mockito.core.version}</version>
<artifactId>akka-testkit_${scala.major.version}</artifactId>
<version>${typesafe.akka.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-api-mockito2</artifactId>
<version>${powermock.api.mockito2.version}</version>
<version>${powermock.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-module-junit4</artifactId>
<version>${powermock.module.junit4.version}</version>
<version>${powermock.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.javassist</groupId>
<artifactId>javassist</artifactId>
<version>3.24.1-GA</version>
<version>3.30.2-GA</version>
</dependency>
</dependencies>
<build>
Expand All @@ -67,7 +63,7 @@
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.5</version>
<version>${jacoco-maven-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand All @@ -80,7 +76,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M4</version>
<version>3.0.0</version>
<configuration>
<!-- <skipTests>true</skipTests> -->
<includes>
Expand Down
14 changes: 8 additions & 6 deletions course-mw/enrolment-actor/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,18 @@
<artifactId>enrolment-actor</artifactId>
<version>1.0-SNAPSHOT</version>
<properties>
<scala.version>2.11.12</scala.version>
<scala.major.version>2.11</scala.major.version>
<scala.major.version>2.12</scala.major.version>
<scala.version>2.12.11</scala.version>
<typesafe.akka.version>2.5.22</typesafe.akka.version>
<jackson.version>2.13.5</jackson.version>
<scoverage.plugin.version>1.4.1</scoverage.plugin.version>
</properties>

<dependencies>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.10.1</version>
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>org.scala-lang</groupId>
Expand Down Expand Up @@ -48,9 +50,9 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>it.ozimov</groupId>
<groupId>com.github.codemonstur</groupId>
<artifactId>embedded-redis</artifactId>
<version>0.7.1</version>
<version>1.1.0</version>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/com.squareup.okhttp3/mockwebserver -->
Expand All @@ -75,7 +77,7 @@
<dependency>
<groupId>com.typesafe.akka</groupId>
<artifactId>akka-testkit_${scala.major.version}</artifactId>
<version>2.5.22</version>
<version>${typesafe.akka.version}</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class CollectionSummaryAggregate @Inject()(implicit val cacheUtil: RedisCacheUti

def transform(druidResponse: String, groupByKeys: List[String]): util.HashMap[String, AnyRef] = {
val transformedResult = new util.HashMap[String, AnyRef]()
import scala.collection.JavaConversions._
import scala.collection.convert.ImplicitConversions._
val parsedResult: AnyRef = JsonUtil.deserialize(druidResponse, classOf[AnyRef])
if (isArray(druidResponse) && parsedResult.asInstanceOf[util.ArrayList[util.Map[String, AnyRef]]].nonEmpty) {
val groupingObj = parsedResult.asInstanceOf[util.ArrayList[util.Map[String, AnyRef]]].map(x => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
package org.sunbird.enrolments

import java.util
import java.util.{Date, TimeZone, UUID}

import com.fasterxml.jackson.databind.ObjectMapper
import javax.inject.Inject
import org.apache.commons.collections4.{CollectionUtils, MapUtils}
import org.apache.commons.lang3.StringUtils
import org.sunbird.cassandra.CassandraOperation
Expand All @@ -20,8 +16,11 @@ import org.sunbird.kafka.client.{InstructionEventGenerator, KafkaClient}
import org.sunbird.learner.constants.{CourseJsonKey, InstructionEvent}
import org.sunbird.learner.util.Util

import scala.collection.JavaConversions._
import java.util
import java.util.{Date, TimeZone, UUID}
import javax.inject.Inject
import scala.collection.JavaConverters._
import scala.collection.convert.ImplicitConversions._

case class InternalContentConsumption(courseId: String, batchId: String, contentId: String) {
def validConsumption() = StringUtils.isNotBlank(courseId) && StringUtils.isNotBlank(batchId) && StringUtils.isNotBlank(contentId)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,11 @@
package org.sunbird.enrolments

import java.sql.Timestamp
import java.text.{MessageFormat, SimpleDateFormat}
import java.time.format.DateTimeFormatter
import java.time.{LocalDate, LocalDateTime, LocalTime, ZoneId}
import java.util
import java.util.{Comparator, Date}
import akka.actor.ActorRef
import com.fasterxml.jackson.databind.ObjectMapper

import javax.inject.{Inject, Named}
import org.apache.commons.collections4.{CollectionUtils, MapUtils}
import org.apache.commons.collections4.CollectionUtils
import org.apache.commons.lang3.StringUtils
import org.sunbird.cache.util.RedisCacheUtil
import org.sunbird.common.CassandraUtil
import org.sunbird.common.exception.ProjectCommonException
import org.sunbird.common.models.response.Response
import org.sunbird.common.models.util.ProjectUtil.EnrolmentType
Expand All @@ -21,16 +15,20 @@ import org.sunbird.common.responsecode.ResponseCode
import org.sunbird.learner.actors.coursebatch.dao.impl.{CourseBatchDaoImpl, UserCoursesDaoImpl}
import org.sunbird.learner.actors.coursebatch.dao.{CourseBatchDao, UserCoursesDao}
import org.sunbird.learner.actors.group.dao.impl.GroupDaoImpl
import org.sunbird.learner.util.{ContentSearchUtil, ContentUtil, CourseBatchSchedulerUtil, JsonUtil, Util}
import org.sunbird.learner.util._
import org.sunbird.models.course.batch.CourseBatch
import org.sunbird.models.user.courses.UserCourses
import org.sunbird.cache.util.RedisCacheUtil
import org.sunbird.common.CassandraUtil
import org.sunbird.common.models.util.ProjectUtil;
import org.sunbird.telemetry.util.TelemetryUtil

import scala.collection.JavaConversions._
import java.sql.Timestamp
import java.text.SimpleDateFormat
import java.time.format.DateTimeFormatter
import java.time.{LocalDate, LocalDateTime, LocalTime}
import java.util
import java.util.Date
import javax.inject.{Inject, Named}
import scala.collection.JavaConverters._
import scala.collection.convert.ImplicitConversions._

class CourseEnrolmentActor @Inject()(@Named("course-batch-notification-actor") courseBatchNotificationActorRef: ActorRef
)(implicit val cacheUtil: RedisCacheUtil ) extends BaseEnrolmentActor {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
package org.sunbird.group

import java.text.MessageFormat

import javax.inject.Inject
import org.apache.commons.collections.CollectionUtils
import org.apache.commons.lang3.StringUtils
import org.sunbird.actor.base.BaseActor
Expand All @@ -16,8 +13,10 @@ import org.sunbird.keys.SunbirdKey
import org.sunbird.learner.actors.group.dao.impl.GroupDaoImpl
import org.sunbird.learner.util.JsonUtil

import scala.collection.JavaConversions._
import java.text.MessageFormat
import javax.inject.Inject
import scala.collection.JavaConverters._
import scala.collection.convert.ImplicitConversions._

class GroupAggregatesActor @Inject()(implicit val cacheUtil: RedisCacheUtil) extends BaseActor {

Expand Down
16 changes: 11 additions & 5 deletions course-mw/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,16 @@
<packaging>pom</packaging>
<name>Sunbird LMS MW</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<scala.major.version>2.12</scala.major.version>
<scala.version>2.12.11</scala.version>
<typesafe.akka.version>2.5.22</typesafe.akka.version>
<play2.plugin.version>1.0.0-beta5</play2.plugin.version>
<mockito.core.version>2.22.0</mockito.core.version>
<powermock.api.mockito2.version>2.0.7</powermock.api.mockito2.version>
<powermock.module.junit4.version>2.0.0-beta.5</powermock.module.junit4.version>
<jackson.version>2.13.5</jackson.version>
<powermock.version>2.0.9</powermock.version>
<jacoco-maven-plugin.version>0.8.8</jacoco-maven-plugin.version>
<scoverage.plugin.version>1.4.1</scoverage.plugin.version>
<slf4j.version>1.6.1</slf4j.version>
</properties>
<modules>
<module>sunbird-util</module>
Expand Down Expand Up @@ -49,7 +55,7 @@
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.4</version>
<version>${jacoco-maven-plugin.version}</version>
<configuration>
<destFile>${basedir}/target/coverage-reports/jacoco-unit.exec</destFile>
<dataFile>${basedir}/target/coverage-reports/jacoco-unit.exec</dataFile>
Expand Down Expand Up @@ -93,7 +99,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M4</version>
<version>3.0.0</version>
</plugin>
</plugins>
</pluginManagement>
Expand Down
Loading