1
- organization := " com.micronautics"
2
-
3
- name := " web3j-scala"
4
-
5
- val web3jVersion = " 4.5.10"
6
- version := web3jVersion
1
+ val web3jVersion = " 4.5.11"
7
2
8
- scalaVersion := " 2.13.1"
9
- // scalaVersion := "2.12.10"
3
+ cancelable := true
10
4
11
5
// Travis can be a PITA
12
6
crossScalaVersions := { if (new java.io.File (" /home/travis" ).exists) Seq (" 2.13.1" ) else Seq (" 2.12.10" , " 2.13.1" ) }
13
7
14
- licenses += (" Apache-2.0" , url(" https://www.apache.org/licenses/LICENSE-2.0.html" ))
15
-
16
- scalacOptions ++= Seq ( // From https://tpolecat.github.io/2017/04/25/scalac-flags.html
17
- " -deprecation" , // Emit warning and location for usages of deprecated APIs.
18
- " -encoding" , " utf-8" , // Specify character encoding used by source files.
19
- " -explaintypes" , // Explain type errors in more detail.
20
- " -feature" , // Emit warning and location for usages of features that should be imported explicitly.
21
- " -language:existentials" , // Existential types (besides wildcard types) can be written and inferred
22
- " -language:experimental.macros" , // Allow macro definition (besides implementation and application)
23
- " -language:higherKinds" , // Allow higher-kinded types
24
- " -language:implicitConversions" , // Allow definition of implicit functions called views
25
- " -unchecked" , // Enable additional warnings where generated code depends on assumptions.
26
- " -Xcheckinit" , // Wrap field accessors to throw an exception on uninitialized access.
27
- // "-Xfatal-warnings", // Fail the compilation if there are any warnings.
28
- " -Xlint:adapted-args" , // Warn if an argument list is modified to match the receiver.
29
- " -Xlint:constant" , // Evaluation of a constant arithmetic expression results in an error.
30
- " -Xlint:delayedinit-select" , // Selecting member of DelayedInit.
31
- " -Xlint:doc-detached" , // A Scaladoc comment appears to be detached from its element.
32
- // "-Xlint:inaccessible", // Warn about inaccessible types in method signatures.
33
- " -Xlint:infer-any" , // Warn when a type argument is inferred to be `Any`.
34
- " -Xlint:missing-interpolator" , // A string literal appears to be missing an interpolator id.
35
- " -Xlint:nullary-override" , // Warn when non-nullary `def f()' overrides nullary `def f'.
36
- " -Xlint:nullary-unit" , // Warn when nullary methods return Unit.
37
- " -Xlint:option-implicit" , // Option.apply used implicit view.
38
- " -Xlint:package-object-classes" , // Class or object defined in package object.
39
- " -Xlint:poly-implicit-overload" , // Parameterized overloaded implicit methods are not visible as view bounds.
40
- " -Xlint:private-shadow" , // A private field (or class parameter) shadows a superclass field.
41
- " -Xlint:stars-align" , // Pattern sequence wildcard must align with sequence component.
42
- " -Xlint:type-parameter-shadow" , // A local type parameter shadows a type already in scope.
43
- )
44
-
45
- // The REPL can’t cope with -Ywarn-unused:imports or -Xfatal-warnings so turn them off for the console
46
- scalacOptions in (Compile , console) --= Seq (" -Ywarn-unused:imports" , " -Xfatal-warnings" )
8
+ fork in Test := true
47
9
48
- scalacOptions in (Compile , doc) ++= baseDirectory.map { bd : File =>
49
- Seq [String ](
50
- " -sourcepath" , bd.getAbsolutePath,
51
- " -doc-source-url" , " https://github.com/mslinn/web3j-scala/tree/master€{FILE_PATH}.scala"
52
- )
53
- }.value
10
+ // define the statements initially evaluated when entering 'console', 'console-quick', but not 'console-project'
11
+ initialCommands in console := """ import scala.sys.process._
12
+ |import java.math.BigInteger
13
+ |import java.util.concurrent.Future
14
+ |import org.web3j.protocol._
15
+ |import org.web3j.protocol.infura._
16
+ |""" .stripMargin
54
17
55
18
javacOptions ++= Seq (
56
19
" -Xlint:deprecation" ,
@@ -60,12 +23,6 @@ javacOptions ++= Seq(
60
23
" -g:vars"
61
24
)
62
25
63
- resolvers ++= Seq (
64
- " Ethereum Maven" at " https://dl.bintray.com/ethereum/maven/" ,
65
- " bintray" at " https://bintray.com/web3j/maven/org.web3j" ,
66
- " Snapshots" at " https://oss.sonatype.org/content/repositories/snapshots"
67
- )
68
-
69
26
libraryDependencies ++= Seq (
70
27
" org.scala-lang.modules" %% " scala-collection-compat" % " 2.1.3" withSources(),
71
28
// See https://docs.web3j.io/modules.html
@@ -100,8 +57,7 @@ libraryDependencies ++= { // Newer versions of Java have had the runtime librar
100
57
case _ => Nil
101
58
}}
102
59
103
- unmanagedSourceDirectories in Test += baseDirectory.value / " abiWrapper"
104
- unmanagedSourceDirectories in Test += baseDirectory.value / " demo"
60
+ licenses += (" Apache-2.0" , url(" https://www.apache.org/licenses/LICENSE-2.0.html" ))
105
61
106
62
logLevel := Level .Warn
107
63
@@ -112,13 +68,58 @@ logLevel in compile := Level.Warn
112
68
// Level.INFO is needed to see detailed output when running tests
113
69
logLevel in test := Level .Info
114
70
115
- // define the statements initially evaluated when entering 'console', 'console-quick', but not 'console-project'
116
- initialCommands in console := """ import scala.sys.process._
117
- |import java.math.BigInteger
118
- |import java.util.concurrent.Future
119
- |import org.web3j.protocol._
120
- |import org.web3j.protocol.infura._
121
- |""" .stripMargin
71
+ name := " web3j-scala"
122
72
123
- cancelable := true
124
- fork in Test := true
73
+ organization := " com.micronautics"
74
+
75
+ resolvers ++= Seq (
76
+ " Ethereum Maven" at " https://dl.bintray.com/ethereum/maven/" ,
77
+ " bintray" at " https://bintray.com/web3j/maven/org.web3j" ,
78
+ // "Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots"
79
+ )
80
+
81
+ scalacOptions ++= Seq ( // From https://tpolecat.github.io/2017/04/25/scalac-flags.html
82
+ " -deprecation" , // Emit warning and location for usages of deprecated APIs.
83
+ " -encoding" , " utf-8" , // Specify character encoding used by source files.
84
+ " -explaintypes" , // Explain type errors in more detail.
85
+ " -feature" , // Emit warning and location for usages of features that should be imported explicitly.
86
+ " -language:existentials" , // Existential types (besides wildcard types) can be written and inferred
87
+ " -language:experimental.macros" , // Allow macro definition (besides implementation and application)
88
+ " -language:higherKinds" , // Allow higher-kinded types
89
+ " -language:implicitConversions" , // Allow definition of implicit functions called views
90
+ " -unchecked" , // Enable additional warnings where generated code depends on assumptions.
91
+ " -Xcheckinit" , // Wrap field accessors to throw an exception on uninitialized access.
92
+ " -Xlint:adapted-args" , // Warn if an argument list is modified to match the receiver.
93
+ " -Xlint:constant" , // Evaluation of a constant arithmetic expression results in an error.
94
+ " -Xlint:delayedinit-select" , // Selecting member of DelayedInit.
95
+ " -Xlint:doc-detached" , // A Scaladoc comment appears to be detached from its element.
96
+ " -Xlint:infer-any" , // Warn when a type argument is inferred to be `Any`.
97
+ " -Xlint:missing-interpolator" , // A string literal appears to be missing an interpolator id.
98
+ " -Xlint:nullary-override" , // Warn when non-nullary `def f()' overrides nullary `def f'.
99
+ " -Xlint:nullary-unit" , // Warn when nullary methods return Unit.
100
+ " -Xlint:option-implicit" , // Option.apply used implicit view.
101
+ " -Xlint:package-object-classes" , // Class or object defined in package object.
102
+ " -Xlint:poly-implicit-overload" , // Parameterized overloaded implicit methods are not visible as view bounds.
103
+ " -Xlint:private-shadow" , // A private field (or class parameter) shadows a superclass field.
104
+ " -Xlint:stars-align" , // Pattern sequence wildcard must align with sequence component.
105
+ " -Xlint:type-parameter-shadow" , // A local type parameter shadows a type already in scope.
106
+ )
107
+
108
+ // The REPL can’t cope with -Ywarn-unused:imports or -Xfatal-warnings so turn them off for the console
109
+ scalacOptions in (Compile , console) --= Seq (" -Ywarn-unused:imports" , " -Xfatal-warnings" )
110
+
111
+ scalacOptions in (Compile , doc) ++= baseDirectory.map { bd : File =>
112
+ Seq [String ](
113
+ " -sourcepath" , bd.getAbsolutePath,
114
+ " -doc-source-url" , " https://github.com/mslinn/web3j-scala/tree/master€{FILE_PATH}.scala"
115
+ )
116
+ }.value
117
+
118
+ scalaVersion := " 2.13.1"
119
+
120
+ unmanagedSourceDirectories in Test ++= Seq (
121
+ baseDirectory.value / " abiWrapper" ,
122
+ baseDirectory.value / " demo"
123
+ )
124
+
125
+ version := web3jVersion
0 commit comments