1R7 No Ant?

Its great to see an update finally, but there doesnt seem to be any ant tools, if its possible to use Gradle instead how do I make the swtich? or do I have to download and install Ant from a different web site?

Hi FootyDirector, and thanks for your request.
Indeed, developers are now encouraged to switch to Gradle.
All new projects created from the provided templates are already targeting Gradle, but existing projects are supposed to be migrated manually.

Ok, thanks for your speedy response. I have been wanting to migrate for a while, so will do so when I have time. I have tried to work around by copying the Ant files from 1R6, but I get another issue :-

C:\NVPACK\android-ndk-r15c\sysroot\usr\include\android\versioning.h(20,89): warning : ‘annotate’ attribute directive ignored [-Wattributes]
1>C:\NVPACK\android-ndk-r15c\sysroot\usr\include\android\versioning.h(20,89): warning : ‘annotate’ attribute directive ignored [-Wattributes]
2> #define __INTRODUCED_IN(api_level) attribute((annotate(“introduced_in=” #api_level)))
1> #define __INTRODUCED_IN(api_level) attribute((annotate(“introduced_in=” #api_level)))
2> ^
1> ^
2> C:\NVPACK\android-ndk-r15c\sysroot\usr\include\string.h(197,3): note: in expansion of macro ‘__INTRODUCED_IN’
1> C:\NVPACK\android-ndk-r15c\sysroot\usr\include\string.h(73,55): note: in expansion of macro ‘__INTRODUCED_IN’
2> __INTRODUCED_IN(21);
1> char* __strchr_chk(const char* _Nonnull, int, size_t) __INTRODUCED_IN(18);
2> ^
1> ^

It looks that the code needs to be adapted for new Unified Headers. Google provides additional information on that:
https://android.googlesource.com/platform/ndk/+/ndk-release-r16/docs/UnifiedHeaders.md
https://android.googlesource.com/platform/ndk/+/ndk-release-r16/docs/UnifiedHeadersMigration.md

A couple things here:

  1. The Release Notes for Codeworks 1R7 say that Ant 1.8.2 will be installed, but it isn’t:
    http://docs.nvidia.com/gameworks/index.html#developertools/mobile/codeworks_android/1r7/release_notes.htm

  2. Some of nVidia’s sample projects still use Ant in 1R7. So 1R7 needs to be updated to include Ant, or the sample projects should be updated to use Gradle, and the mention of Ant should be removed from the Release Notes.

  3. Related, the release notes also mention Gradle 4.1, but 2.9 is installed instead.

  4. From what I can tell, the annotate attribute is not understood by the version of GCC included, and that’s why we’re seeing this warning. Annotate attribute is understood by clang however, so switching to clang might be something to consider.

  5. If you need to stick with gcc, you can suppress warnings of all unknown attributes with the -Wno-attributes compiler option.

  6. Toolchain Version=Default currently chooses gcc. Clang appears to be the future of Android development, so the Default should probably be changed to clang.

I am too running into many issues with VS 2017, here Tegra-Android is not even working as a Platform.
On 2015, which uses to work, I am also getting an error about Gradle min version is 3.3 and I am using 2.9
And ANT, which was not installed, is also missing since it dumped an error after I tried to compile. Maybe this is related to a project upgrade.

Hi Xood,
Let’s clarify a few things about Nsight Tegra Visual Studio Edition 3.5 requirements:

  1. It requires Gradle 4.1 to be installed on the PC, as it generates Gradle build scripts that require Android Plugin for Gradle 2.3.3
    https://developer.android.com/studio/releases/gradle-plugin.html#2-3-0
  2. It requires Ant 1.8.x to be installed on the PC
  3. It requires Android SDK Tools 25.2.5. This is a separate SDK component, that shouldn’t be confused with SDK build and platform tools.
    https://developer.android.com/studio/releases/sdk-tools.html

You can install all these components manually, bypassing the CodeWorks installer.

I pretty much assumed if I do it the recommended way by using CodeWorks, it would install everything which is neccesary. After all it did install Gradle, just an older version.
Were my assumptions incorrect?

Thank you Mikhail.

Xood,

You’re welcome. The assumptions are correct, but, unfortunately, the installer from CodeWorks 1R7 mismanages Gradle and Ant installations.
Manual installation of Ant 1.8.x and Gradle 4.1 is the recommended workaround.