Fixed
Status Update
Comments
uc...@google.com <uc...@google.com>
ki...@gmail.com <ki...@gmail.com> #2
This doesn't repro for me. Steps:
(1) Create new C++ project
(2) Run the app (this create's the binary directories
(3) Do something to cause a gradle Sync
(4) Look for files under .externalNativeBuild. They're there:
jomof@jomof:~/projects/client/src/android/MyApplication4/app$ find "." -name "*.o"
./.externalNativeBuild/cmake/debug/x86/CMakeFiles/native-lib.dir/src/main/cpp/native-lib.cpp.o
Please add repro steps so I can get a better idea of what's happening.
>> It should only delete the CMake binary directories *if and only if* parameters change in Gradle that cause cmake toolchain parameters to change (such as platform version, abi, toolchain) or parameters passed to CMake to change.
This is the way it's design to work and it is working that way for the cases I know
(1) Create new C++ project
(2) Run the app (this create's the binary directories
(3) Do something to cause a gradle Sync
(4) Look for files under .externalNativeBuild. They're there:
jomof@jomof:~/projects/client/src/android/MyApplication4/app$ find "." -name "*.o"
./.externalNativeBuild/cmake/debug/x86/CMakeFiles/native-lib.dir/src/main/cpp/native-lib.cpp.o
Please add repro steps so I can get a better idea of what's happening.
>> It should only delete the CMake binary directories *if and only if* parameters change in Gradle that cause cmake toolchain parameters to change (such as platform version, abi, toolchain) or parameters passed to CMake to change.
This is the way it's design to work and it is working that way for the cases I know
ha...@gmail.com <ha...@gmail.com> #3
I realized that there were a few things we were doing that were questionable. Specifically, we set up our CMake command line params in a variable at the root build.gradle script. We were generating build dates and such in gradle and passing those down to CMake. I think things like this may be causing the CMake args to change too often, possibly resulting in this behavior. I'm in the process of eliminating a lot of this, so I'll make sure to report back the results.
tn...@google.com <tn...@google.com> #4
So even after making my changes, I still see this behavior. My repro steps:
1. Make a change to a CMake script
2. Switch to Android Studio. I am prompted to do gradle sync, and so I do it.
On next build, a full rebuild is performed. For some reason it is not performing a delta build. Some libraries are rebuilding that should not be rebuilt. So obviously a "ninja clean" is happening somewhere. There's simply no other explanation for this.
Jomo, can you please reopen? This is still a very real problem.
1. Make a change to a CMake script
2. Switch to Android Studio. I am prompted to do gradle sync, and so I do it.
On next build, a full rebuild is performed. For some reason it is not performing a delta build. Some libraries are rebuilding that should not be rebuilt. So obviously a "ninja clean" is happening somewhere. There's simply no other explanation for this.
Jomo, can you please reopen? This is still a very real problem.
lo...@gmail.com <lo...@gmail.com> #5
Hey Robert,
From what you wrote I think this is intended behavior. If you change the CMake script then the CMake-generated Ninja project must be regenerated. Since there's a new Ninja project there needs to be a full build. There's no concept of delta build that survives changes to build command files (CMakeLists.txt or ninja build files) because any behavior difference is possible.
From what you wrote I think this is intended behavior. If you change the CMake script then the CMake-generated Ninja project must be regenerated. Since there's a new Ninja project there needs to be a full build. There's no concept of delta build that survives changes to build command files (CMakeLists.txt or ninja build files) because any behavior difference is possible.
Description
As of version alpha-08 of the new Android Gradle Plugin (3.1.0-alpha08), Lint is detecting some CheckResult errors in Kotlin code even when the result isn't really ignored. The following snippet should be able to trigger the CheckResult error:
listOf(1, 2, 3, 4).map {
if (it % 2 == 0) {
Single.just(it)
} else {
Single.just(it + 1)
}
I've also attached the html report here. If you need to take a look at those classes, the project is open source: