Apollo Android (GraphQL) custom type build file warning: “Cannot assign value to final field”
up vote
0
down vote
favorite
The following closure in the app-level build file shows the warning "Cannot assign value to final field" in relation to the customTypeMapping object:
apollo {
customTypeMapping = [
"DateTime" : "java.lang.String",
"UUID" : "java.lang.String",
"JSONString" : "java.lang.String"
]
}
This appears to be a recent change in a dependency or tools. I've tried other statement formats, e.g.:
customTypeMapping["DateTime"]="java.lang.String"
but without success (that shows a build error: No such property: DateTime for class: org.gradle.api.internal.provider.DefaultPropertyState)
The code at the start of this question functions as expected, but how do I clear the warning?
Apollo dependency:
classpath "com.apollographql.apollo:apollo-gradle-plugin:1.0.0-alpha2"

add a comment |
up vote
0
down vote
favorite
The following closure in the app-level build file shows the warning "Cannot assign value to final field" in relation to the customTypeMapping object:
apollo {
customTypeMapping = [
"DateTime" : "java.lang.String",
"UUID" : "java.lang.String",
"JSONString" : "java.lang.String"
]
}
This appears to be a recent change in a dependency or tools. I've tried other statement formats, e.g.:
customTypeMapping["DateTime"]="java.lang.String"
but without success (that shows a build error: No such property: DateTime for class: org.gradle.api.internal.provider.DefaultPropertyState)
The code at the start of this question functions as expected, but how do I clear the warning?
Apollo dependency:
classpath "com.apollographql.apollo:apollo-gradle-plugin:1.0.0-alpha2"

add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
The following closure in the app-level build file shows the warning "Cannot assign value to final field" in relation to the customTypeMapping object:
apollo {
customTypeMapping = [
"DateTime" : "java.lang.String",
"UUID" : "java.lang.String",
"JSONString" : "java.lang.String"
]
}
This appears to be a recent change in a dependency or tools. I've tried other statement formats, e.g.:
customTypeMapping["DateTime"]="java.lang.String"
but without success (that shows a build error: No such property: DateTime for class: org.gradle.api.internal.provider.DefaultPropertyState)
The code at the start of this question functions as expected, but how do I clear the warning?
Apollo dependency:
classpath "com.apollographql.apollo:apollo-gradle-plugin:1.0.0-alpha2"

The following closure in the app-level build file shows the warning "Cannot assign value to final field" in relation to the customTypeMapping object:
apollo {
customTypeMapping = [
"DateTime" : "java.lang.String",
"UUID" : "java.lang.String",
"JSONString" : "java.lang.String"
]
}
This appears to be a recent change in a dependency or tools. I've tried other statement formats, e.g.:
customTypeMapping["DateTime"]="java.lang.String"
but without success (that shows a build error: No such property: DateTime for class: org.gradle.api.internal.provider.DefaultPropertyState)
The code at the start of this question functions as expected, but how do I clear the warning?
Apollo dependency:
classpath "com.apollographql.apollo:apollo-gradle-plugin:1.0.0-alpha2"


asked 2 days ago
Ollie C
19.4k31119186
19.4k31119186
add a comment |
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53372662%2fapollo-android-graphql-custom-type-build-file-warning-cannot-assign-value-to%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown