diff --git a/build.sbt b/build.sbt index 685f9489b..766f2b279 100644 --- a/build.sbt +++ b/build.sbt @@ -37,7 +37,6 @@ writeVersionToFile := { lazy val root = (project in file(".")) .doPatchDependencies() .aggregate( - protocolRaw, protocolCompiler, compiler, snapiParser, @@ -57,37 +56,19 @@ lazy val root = (project in file(".")) publishLocal / skip := true ) -lazy val protocolRaw = (project in file("protocol-raw")) - .doPatchDependencies() - .enablePlugins(ProtobufPlugin) - .settings( - commonSettings, - commonCompileSettings, - testSettings, - // Set fixed versions - ProtobufConfig / version := "3.25.4", - ProtobufConfig / protobufGrpcVersion := "1.62.2", - // Forcing the dependency so that 'requires' annotation in module-info.java works properly. - libraryDependencies += "com.google.protobuf" % "protobuf-java" % ((ProtobufConfig / version).value), - // Include the protobuf files in the JAR - Compile / unmanagedResourceDirectories += (ProtobufConfig / sourceDirectory).value - ) - lazy val protocolCompiler = (project in file("protocol-compiler")) .doPatchDependencies() - .dependsOn( - protocolRaw % "compile->compile;test->test;protobuf->protobuf" - ) .enablePlugins(ProtobufPlugin) .settings( commonSettings, commonCompileSettings, testSettings, + libraryDependencies ++= Seq( + protocolRaw % "compile->compile;test->test;protobuf->protobuf" + ), // Set fixed versions ProtobufConfig / version := "3.25.4", ProtobufConfig / protobufGrpcVersion := "1.62.2", - // Include the protobuf files from the raw package - ProtobufConfig / protobufIncludePaths += (protocolRaw / ProtobufConfig / sourceDirectory).value, // Forcing the dependency so that 'requires' annotation in module-info.java works properly. libraryDependencies += "com.google.protobuf" % "protobuf-java" % ((ProtobufConfig / version).value), // Include the protobuf files in the JAR diff --git a/project/Dependencies.scala b/project/Dependencies.scala index 6b7679ac1..997a6a449 100644 --- a/project/Dependencies.scala +++ b/project/Dependencies.scala @@ -18,6 +18,8 @@ object Dependencies { val utilsSources = "com.raw-labs" %% "utils-sources" % "0.50.0" + val protocolRaw = "com.raw-labs" %% "protocol-raw" % "0.50.0" + val scalaLogging = "com.typesafe.scala-logging" %% "scala-logging" % "3.9.5" val logbackClassic = "ch.qos.logback" % "logback-classic" % "1.4.12" @@ -63,7 +65,7 @@ object Dependencies { val apacheHttpClient = "org.apache.httpcomponents.client5" % "httpclient5" % "5.2.1" val dropboxSDK = "com.dropbox.core" % "dropbox-core-sdk" % "5.4.5" val postgresqlDeps = "org.postgresql" % "postgresql" % "42.5.4" - val mysqlDeps = "com.mysql" % "mysql-connector-j" % "8.1.0" exclude("com.google.protobuf", "protobuf-java") + val mysqlDeps = "com.mysql" % "mysql-connector-j" % "8.1.0" exclude ("com.google.protobuf", "protobuf-java") val mssqlDeps = "com.microsoft.sqlserver" % "mssql-jdbc" % "7.0.0.jre10" val snowflakeDeps = "net.snowflake" % "snowflake-jdbc" % "3.13.33" val oracleDeps = "com.oracle.database.jdbc" % "ojdbc10" % "19.23.0.0" diff --git a/protocol-raw/src/main/java/com/rawlabs/protocol/raw/Placeholder.java b/protocol-raw/src/main/java/com/rawlabs/protocol/raw/Placeholder.java deleted file mode 100644 index dcc09a346..000000000 --- a/protocol-raw/src/main/java/com/rawlabs/protocol/raw/Placeholder.java +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright 2024 RAW Labs S.A. - * - * Use of this software is governed by the Business Source License - * included in the file licenses/BSL.txt. - * - * As of the Change Date specified in that file, in accordance with - * the Business Source License, use of this software will be governed - * by the Apache License, Version 2.0, included in the file - * licenses/APL.txt. - */ - -package com.rawlabs.protocol.raw; - -class Placeholder { - // Placeholder class to allow the module-info.java file to be compiled -} diff --git a/protocol-raw/src/main/java/module-info.java b/protocol-raw/src/main/java/module-info.java deleted file mode 100644 index 00af9921d..000000000 --- a/protocol-raw/src/main/java/module-info.java +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright 2024 RAW Labs S.A. - * - * Use of this software is governed by the Business Source License - * included in the file licenses/BSL.txt. - * - * As of the Change Date specified in that file, in accordance with - * the Business Source License, use of this software will be governed - * by the Apache License, Version 2.0, included in the file - * licenses/APL.txt. - */ - -module raw.protocol.raw { - requires com.google.protobuf; - - exports com.rawlabs.protocol.raw; -} diff --git a/protocol-raw/src/main/protobuf/com/rawlabs/protocol/raw/types.proto b/protocol-raw/src/main/protobuf/com/rawlabs/protocol/raw/types.proto deleted file mode 100644 index 0ade48641..000000000 --- a/protocol-raw/src/main/protobuf/com/rawlabs/protocol/raw/types.proto +++ /dev/null @@ -1,149 +0,0 @@ -/** - * Copyright 2024 RAW Labs S.A. - * All rights reserved. - * - * This source code is the property of RAW Labs S.A. It contains - * proprietary and confidential information that is protected by applicable - * intellectual property and other laws. Unauthorized use, reproduction, - * or distribution of this code, or any portion of it, may result in severe - * civil and criminal penalties and will be prosecuted to the maximum - * extent possible under the law. - */ - -syntax = "proto3"; - -option java_package = "com.rawlabs.protocol.raw"; -option java_multiple_files = true; - -package com.rawlabs.protocol.raw; - -message Type { - oneof type { - AnyType any = 1; - UndefinedType undefined = 2; - ByteType byte = 3; - ShortType short = 4; - IntType int = 5; - LongType long = 6; - FloatType float = 7; - DoubleType double = 8; - DecimalType decimal = 9; - BoolType bool = 10; - StringType string = 11; - BinaryType binary = 12; - DateType date = 13; - TimeType time = 14; - TimestampType timestamp = 15; - IntervalType interval = 16; - RecordType record = 17; - ListType list = 18; - IterableType iterable = 19; - OrType or = 20; - } -} - -message AnyType {} - -message UndefinedType { - bool nullable = 1; - bool triable = 2; -} - -message ByteType { - bool nullable = 1; - bool triable = 2; -} - -message ShortType { - bool nullable = 1; - bool triable = 2; -} - -message IntType { - bool nullable = 1; - bool triable = 2; -} - -message LongType { - bool nullable = 1; - bool triable = 2; -} - -message FloatType { - bool nullable = 1; - bool triable = 2; -} - -message DoubleType { - bool nullable = 1; - bool triable = 2; -} - -message DecimalType { - bool nullable = 1; - bool triable = 2; -} - -message BoolType { - bool nullable = 1; - bool triable = 2; -} - -message StringType { - bool nullable = 1; - bool triable = 2; -} - -message BinaryType { - bool nullable = 1; - bool triable = 2; -} - -message DateType { - bool nullable = 1; - bool triable = 2; -} - -message TimeType { - bool nullable = 1; - bool triable = 2; -} - -message TimestampType { - bool nullable = 1; - bool triable = 2; -} - -message IntervalType { - bool nullable = 1; - bool triable = 2; -} - -message RecordType { - repeated AttrType atts = 1; - bool nullable = 2; - bool triable = 3; -} - -message AttrType { - string idn = 1; - Type tipe = 2; -} - -message ListType { - Type innerType = 1; - bool nullable = 2; - bool triable = 3; -} - -message IterableType { - Type innerType = 1; - bool nullable = 2; - bool triable = 3; -} - -message OrType { - repeated Type ors = 1; - bool nullable = 2; - bool triable = 3; -} diff --git a/protocol-raw/src/main/protobuf/com/rawlabs/protocol/raw/values.proto b/protocol-raw/src/main/protobuf/com/rawlabs/protocol/raw/values.proto deleted file mode 100644 index 0dc3a3d4e..000000000 --- a/protocol-raw/src/main/protobuf/com/rawlabs/protocol/raw/values.proto +++ /dev/null @@ -1,134 +0,0 @@ -/** - * Copyright 2024 RAW Labs S.A. - * All rights reserved. - * - * This source code is the property of RAW Labs S.A. It contains - * proprietary and confidential information that is protected by applicable - * intellectual property and other laws. Unauthorized use, reproduction, - * or distribution of this code, or any portion of it, may result in severe - * civil and criminal penalties and will be prosecuted to the maximum - * extent possible under the law. - */ - -syntax = "proto3"; - -option java_package = "com.rawlabs.protocol.raw"; -option java_multiple_files = true; - -package com.rawlabs.protocol.raw; - -message Value { - oneof value { - ValueNull null = 2; - ValueError error = 3; - ValueByte byte = 4; - ValueShort short = 5; - ValueInt int = 6; - ValueLong long = 7; - ValueFloat float = 8; - ValueDouble double = 9; - ValueDecimal decimal = 10; - ValueBool bool = 11; - ValueString string = 12; - ValueBinary binary = 13; - ValueDate date = 15; - ValueTime time = 16; - ValueTimestamp timestamp = 17; - ValueInterval interval = 18; - ValueRecord record = 19; - ValueList list = 20; - } -} - -message ValueNull {} - -message ValueError { - string message = 1; -} - -message ValueByte { - int32 v = 1; -} - -message ValueShort { - int32 v = 1; -} - -message ValueInt { - int32 v = 1; -} - -message ValueLong { - int64 v = 1; -} - -message ValueFloat { - float v = 1; -} - -message ValueDouble { - double v = 1; -} - -message ValueDecimal { - string v = 1; -} - -message ValueBool { - bool v = 1; -} - -message ValueString { - string v = 1; -} - -message ValueBinary { - bytes v = 1; -} - -message ValueDate { - int32 year = 1; - int32 month = 2; - int32 day = 3; -} - -message ValueTime { - int32 hour = 1; - int32 minute = 2; - int32 second = 3; - int32 nano = 4; -} - -message ValueTimestamp { - int32 year = 1; - int32 month = 2; - int32 day = 3; - int32 hour = 4; - int32 minute = 5; - int32 second = 6; - int32 nano = 7; -} - -message ValueInterval { - int32 years = 1; - int32 months = 2; - int32 weeks = 3; - int32 days = 4; - int32 hours = 5; - int32 minutes = 6; - int32 seconds = 7; - int32 millis = 8; -} - -message ValueRecord { - repeated ValueRecordField fields = 1; -} - -message ValueRecordField { - string name = 1; - Value value = 2; -} - -message ValueList { - repeated Value values = 1; -} \ No newline at end of file