File tree Expand file tree Collapse file tree 5 files changed +15
-7
lines changed
src/main/java/org/wordpress/android/processor Expand file tree Collapse file tree 5 files changed +15
-7
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ plugins {
12
12
ext {
13
13
wordPressUtilsVersion = ' 2.7.0'
14
14
wordPressLoginVersion = ' 0.19.0'
15
+ aztecVersion = ' v1.6.0'
15
16
gutenbergMobileVersion = ' v1.82.1'
16
17
storiesVersion = ' 1.4.0'
17
18
aboutAutomatticVersion = ' 0.0.6'
44
45
45
46
composeVersion = ' 1.1.1'
46
47
48
+ // annotations/processors
49
+ kotlinPoetVersion = ' 1.6.0'
50
+ autoServiceVersion = ' 1.0'
51
+
47
52
// testing
48
53
jUnitVersion = ' 4.13'
49
54
jUnitExtVersion = ' 1.1.3'
Original file line number Diff line number Diff line change @@ -4,8 +4,6 @@ plugins {
4
4
id " org.jetbrains.kotlin.plugin.parcelize"
5
5
}
6
6
7
- ext. aztecVersion = ' v1.6.0'
8
-
9
7
repositories {
10
8
maven {
11
9
url " https://a8c-libs.s3.amazonaws.com/android"
Original file line number Diff line number Diff line change @@ -3,8 +3,11 @@ plugins {
3
3
id " org.jetbrains.kotlin.kapt"
4
4
}
5
5
6
- ext. kotlinPoetVersion = ' 1.6.0'
7
- ext. autoServiceVersion = ' 1.0'
6
+ compileKotlin {
7
+ kotlinOptions {
8
+ allWarningsAsErrors = true
9
+ }
10
+ }
8
11
9
12
dependencies {
10
13
implementation project(' :libs:annotations' )
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import com.squareup.kotlinpoet.TypeSpec
11
11
import java.util.Locale
12
12
13
13
class RemoteConfigCheckBuilder (private val remoteFeatures : List <TypeName >) {
14
+ @Suppress(" DEPRECATION" )
14
15
fun getContent (): FileSpec {
15
16
val remoteFeaturesWithNames = remoteFeatures.map {
16
17
it.toString()
@@ -49,10 +50,10 @@ class RemoteConfigCheckBuilder(private val remoteFeatures: List<TypeName>) {
49
50
private fun buildCheckFunction (remoteFeatures : List <Pair <String , TypeName >>): CodeBlock {
50
51
val stringBuilder = StringBuilder ()
51
52
remoteFeatures.forEach { feature ->
52
- stringBuilder.appendln (" if (${feature.first} .remoteField == null) {" )
53
+ stringBuilder.appendLine (" if (${feature.first} .remoteField == null) {" )
53
54
val error = " throw IllegalArgumentException(\"\"\" ${feature.second} needs to define remoteField\"\"\" )"
54
- stringBuilder.appendln (error)
55
- stringBuilder.appendln (" }" )
55
+ stringBuilder.appendLine (error)
56
+ stringBuilder.appendLine (" }" )
56
57
}
57
58
return CodeBlock .of(stringBuilder.toString().trimIndent())
58
59
}
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ import javax.tools.Diagnostic.Kind
24
24
" org.wordpress.android.annotation.FeatureInDevelopment"
25
25
)
26
26
class RemoteConfigProcessor : AbstractProcessor () {
27
+ @Suppress(" DEPRECATION" )
27
28
override fun process (p0 : MutableSet <out TypeElement >? , roundEnvironment : RoundEnvironment ? ): Boolean {
28
29
val experiments = roundEnvironment?.getElementsAnnotatedWith(Experiment ::class .java)?.map { element ->
29
30
val annotation = element.getAnnotation(Experiment ::class .java)
You can’t perform that action at this time.
0 commit comments