summaryrefslogtreecommitdiff
path: root/android/api_levels.go
AgeCommit message (Collapse)Author
2021-11-05S V2 is now 32Michael Wright
Bug: 204295952 Test: N/A Change-Id: Ib13f30c27cf79c2903e05d3c2cd27d79c4a28668 Merged-In: Ib13f30c27cf79c2903e05d3c2cd27d79c4a28668
2021-06-01platform/build/soong - S is now 31Jeff Sharkey
Bug: 171506470 Test: Build Change-Id: I7b02ab24d12ea07463efd319a7ff059751416990
2021-05-17cc/linker.go: check min_sdk_version.Elliott Hughes
Checking sdk_version broke mainline code that compiles against a current API level but needs to be able to run on an older API level. Bug: http://b/187907243 Test: treehugger Change-Id: If1192ef2809e39b043f0a384775b6c9e3a8bd619
2021-04-03Move java.sdkSpec to the android packageJiyong Park
... in preparation for making the handling of sdk versions consistent across java and cc modules. Bug: 175678607 Test: m Change-Id: I598f0454bce9b7320621022115412fbe97403945
2021-02-05cc: fix version macro for stubsJooyung Han
When a cc module is built against a stub, compiler passes version macro of the stub lib. Version macro should be numeric, so codenames or "current" should be mapped to numbers just like how ndkstubgen maps to. * "current" -> future (10000) * codenames -> look up api_level.json * otherwise -> cast to int Bug: 179329813 Test: m / soong test / manually check the output build.ninja Change-Id: Ic0e1dd904984e161694a0b77fad5559c06a4462f
2021-01-26apex: checks min_sdk_version for preview/currentJooyung Han
If we don't check "current", it won't be checked even in the finalized branch. If we don't check "preview", it should be done during the SDK finalization. It'd be better done before the SDK finalization regarding that setting min_sdk_version is to get approval from deps library owners. Bug: 177833148 Test: m (soong tests) Change-Id: I712b61cfe5a134fbb69c73956d26fb3a1e5c011e
2020-11-14Replace android.WriteFile rule with android.WriteFileRuleColin Cross
The android.WriteFile rule takes careful escaping to produce the right contents. Wrap it in an android.WriteFileRule that handles the escaping. Test: compare all android.WriteFile outputs Change-Id: If71a5843af47a37ca61714e1a1ebb32d08536c31
2020-10-02Fix apex_test.go and add it to Android.bpColin Cross
apex_test.go wasn't listed in the Android.bp file, which allowed it to bitrot. Make the API level methods take a PathContext so that they can be called from a test using configErrorWrapper. Also fix an int that was converted to a string. Test: apex_test.go Change-Id: I1ff87134c837bd5d344d22550baabde10d1b0b2e
2020-09-22Convert more versions in config to ApiLevel.Dan Albert
The test case I removed is invalid. The codename has had its int assigned, but the config claims it is not final. If this ever does need to be supported it's just a matter of making sure the Q -> 29 mapping (or whatever) in the finalized codenames map in android/api_levels.go. Test: treehugger Bug: http://b/154667674 Change-Id: I4f42ec2fd4a37750519ee3937938a1c65b6bb1e8
2020-09-22Replace FutureApiLevel with an ApiLevel.Dan Albert
Keeping the int constant around for now as FutureApiLevelInt because it's still useful in places that haven't adopted ApiLevel yet for testing if their non-ApiLevel API level is current or not. Test: treehugger Bug: http://b/154667674 Change-Id: I47a7012703f41fdeb56f91edf9c83afa93042deb
2020-09-22Replace ApiStrToNum uses with ApiLevel.Dan Albert
Test: treehugger Bug: http://b/154667674 Change-Id: I2954bb21c1cfdeb305f25cfb6c8711c930f6ed50
2020-09-18Update finalized codenames map.Dan Albert
Test: None Bug: None Change-Id: I9846776ff93fa2ead0affeff729a3c7bb934fbf8
2020-09-18Replace stringly-typed API levels.Dan Albert
Handling of API levels within Soong is currently fairly difficult since it isn't always clear based on context what kind of API level a given string represents, how much canonicalizing and error checking the code receiving the string are expected to do, or how those errors should be treated. The API level struct does not export its raw data, so as to keep its "constructor" private to the android package, and to prevent misuse of the `number` field, which is only an implementation detail for preview API levels. API levels can be parsed with either `android.ApiLevelFromUser`, which returns any errors to the caller, or `android.ApiLevelOrPanic`, which is used in the case where the input is trusted and any errors in parsing should panic. Even within the `android` package, these APIs should be preferred over direct construction. For cases where there are context specific parsing requirements, such as handling the "minimum" alias in the cc module, `nativeApiLevelFromUser` and `nativeApiLevelOrPanic` should be used instead. Test: treehugger Bug: http://b/154667674 Change-Id: Id52921fda32cb437fb1775ac2183299dedc0cf20
2020-05-02Updating platform SDK version for RSvet Ganov
* Update SDK versions Test: build + boot bug:150281259 Exempt-From-Owner-Approval: merge conflict resolution Change-Id: I30d7cda3c95327c4080e279e876129eb9e6a8091 Merged-In: I30d7cda3c95327c4080e279e876129eb9e6a8091
2020-04-08Remove PLATFORM_VERSION_FUTURE_CODENAMESJooyung Han
It has been wrong to split ALL_VERSIONS into exclusive two sets of before/after TARGET_PLATFORM_VERSION. And PLATFORM_VERSION_ALL_CODENAMES supports all *active* list of non-finalized codenames. Bug: 152960049 Test: m Change-Id: I78ca88758998e440bea72ba2d56d90eea3ec99ae
2020-04-02Apex: support codenames for min_sdk_versionJooyung Han
Apex can use codenames like "Q", "R" for its min_sdk_version property. Also, cc_library can use codenames for its stubs.versions. Bug: 152655956 Test: vendor/google/build/build_mainline_modules.sh Change-Id: I077ad7b2ac5d90b4c8708921e43846206f05ba70
2019-06-10Merge changes I9f8df94f,I2d7f5c56,I0ebb7381,Ieefcfc1a am: a6bf56d4beColin Cross
am: 236ac108f5 Change-Id: Ia0777130add15aceb17739f5dcb613ca4e1bf172
2019-06-06Consolidate baseContext, BaseContext, and BaseModuleContextColin Cross
blueprint.BaseModuleContext is the set of methods available to all module-specific calls (GenerateBuildActions or mutators). The android package split the same functionality across baseContext (nee androidBaseContext), BaseModuleContext, and BaseContext. Consolidate all of them into android.BaseModuleContext. Test: m checkbuild Change-Id: I2d7f5c56fd4424032cb93edff6dc730ff33e4f1e
2019-05-11Revert "Revert "Android Q is API 29""Ian Pedowitz
This reverts commit 9e2bf9ec51ad16e8bc8f3754eadc2cd4a0b40e73. Reason for revert: Rolling forward for Q-Finalization Bug: 129975435 Bug: 129943426 Change-Id: Ic8a09aca67c189edfda4b10e5deb13716eb66adc Test: Build
2019-05-02Revert "RESTRICT AUTOMERGE Android Q is API 29"Ian Pedowitz
This reverts commit ca6e92767850864b665d1e4a14af182a241b26a7. Reason for revert: QT SDK Finalization. Will be merged again on/after May 13th Bug: 129975435 Change-Id: Ice988aea0cab8ba462166c27b0d7f95fc7d46466
2019-04-30RESTRICT AUTOMERGE Android Q is API 29Suprabh Shukla
Test: Only updated a constant. Builds as expected. Bug: 129975435 Change-Id: I10bb72d59d7ffdb942b11701d3cebc383afa6a77
2019-02-06Prepare for a type-safe OnceKeyColin Cross
Add an opaque OnceKey type and use it for all calls to Once in build/soong. A future patch will convert the arguments to Once* to OnceKey once users outside build/soong have been updated. Test: onceper_test.go Change-Id: Ifcb338e6e603e804e507203c9508d30ffb2df966
2018-07-24Stop versioning NDK stubs pre-M.Dan Albert
Test: make ndk # readelf various stubs to check version info Bug: https://github.com/android-ndk/ndk/issues/622 Change-Id: Ic2930cfe5ee8377bb89bfb1bc051b6975f6e57d3 Merged-In: Ic2930cfe5ee8377bb89bfb1bc051b6975f6e57d3 (cherry picked from commit c229f38e93da71bcf9beca3683f5a603b7dd3bca)
2018-04-12Finalizing P SDKWale Ogunwale
Bug: 77588754 Test: builds Change-Id: I07930ba9ca1f8b60a45109c4cc08ed2f17ea19fa
2017-11-30Make *Context.Config return a Config instead of a interface{}Colin Cross
In Soong, a Config() method will always return a Config. Make ModuleContext, SingletonContext, TopDownMutatorContext and BottomUpMutatorContext's Config() methods explictly return a Config to avoid having to type-assert everywhere. Overriding the Config method requires duplicating the list of methods in blueprint.BaseModuleContext and blueprint.BottomUpMutatorContext, following the same pattern used by the other *Contexts. Config() obsoletes the AConfig() method used in some places, which will be cleaned up in the next patch. Test: m checkbuild Change-Id: Ibe21efde933959811d52443496967ab8ce71215e
2017-11-29Wrap PackageContext and SingletonContextColin Cross
Wrap blueprint.PackageContext so that the *Func methods can provide an android.Config instead of an interface{}. The modified signatures means that every method in ModuleContext and SingletonContext that takes a blueprint.PackageContext now needs to be wrapped to take an android.PackageContext. SingletonContext wasn't previously wrapped at all, but as long as it is, wrap everything like ModuleContext does. This requires updating every Singleton to use the android-specific methods. Test: builds, all Soong tests pass Change-Id: I4f22085ebca7def6c5cde49e8210b59d994ba625
2017-08-29Add a name to API level map for O.Dan Albert
O is released, so we don't get this knowledge from the development codenames list any more. Test: make ndk # with an API using introduced=O Bug: None Change-Id: I21104c5d97c89f2f85157ac7d73de8cd5a478571
2017-08-02Adapt to PLATFORM_VERSION_FUTURE_CODENAMES.Dan Albert
Don't preserve the confusing names from make. Rename AllCodenames to ActiveCodenames, add FutureCodenames, and add CombinedCodenames to fetch the *real* AllCodenames. To allow `introduced=P` in NDK library definitions, we need to know that P exists. Use the combined list of current and future API codenames generating stubs. Test: make ndk Test: check out/soong/api_levels.json Bug: None Change-Id: I435f9ce7446236edc268a84e33474044a55a6302
2017-07-28Add NDK API codenames for old releases.Dan Albert
Without these, we'd need to go rewrite all the stub templates to stop using the codename and use the number instead whenever an API is released. Test: changed something in libc to use introduced=L, make ndk Bug: None Change-Id: I1b8703655664c567f8a5c36219e73f11ba27d99a
2017-05-10Prettify soong ninja build descriptionsColin Cross
Descriptions currently look like: [ 0% 4/29328] cc out-soong/.intermediates/external/clang/lib/Sema/libclangSema/android_arm_armv7-a-neon_denver_static_core/obj/external/clang/lib/Sema/SemaCodeComplete.o This is not very helpful - most of the characters are used to show the output path, which contains useful information like target architecture, but also contains most of the path to the source files twice, and less useful information like the exact variant name used by soong. Make the descriptions look like: [ 0% 3/29329] //external/clang/lib/Sema:libclangSema clang++ SemaTemplateInstantiate.cpp This is //path/to/module:modulename tool relative/path/to/source/file Test: builds, looks pretty Change-Id: I3087aa7d4eb1860ef6239d77407b8b35445616d7
2017-03-31Generate file to map codenames to API levels.Dan Albert
The NDK stub library generator needs to know what unreleased API levels exist and what the ordering is between them. This singleton will later be expanded to generate api-level.h to cut down on duplication. Test: make out/soong/api_levels.json && cat out/soong/api_levels.json Bug: None Change-Id: I53126dd2cacb67c331c44f7d7c77c98b176b93cd