Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c28c48b4 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Refresh the latest script versions + preparation for local mode."

parents 3f6ffaa3 bdcef7bf
Loading
Loading
Loading
Loading
+23 −0
Original line number Diff line number Diff line
#!/bin/bash

set -ex

function finalize_main_step12() {
    local top="$(dirname "$0")"/../../../..
    source $top/build/make/tools/finalization/environment.sh

    # default target to modify tree and build SDK
    local m="$top/build/soong/soong_ui.bash --make-mode TARGET_PRODUCT=aosp_arm64 TARGET_BUILD_VARIANT=userdebug"

    # SDK codename -> int
    source $top/build/make/tools/finalization/finalize-aidl-vndk-sdk-resources.sh

    # Platform/Mainline SDKs build and move to prebuilts
    source $top/build/make/tools/finalization/localonly-finalize-mainline-sdk.sh

    # REL
    source $top/build/make/tools/finalization/finalize-sdk-rel.sh
}

finalize_main_step12
+19 −0
Original line number Diff line number Diff line
#!/bin/bash

set -ex

function finalize_main_step1_and_m() {
    local top="$(dirname "$0")"/../../../..
    source $top/build/make/tools/finalization/build-step-1.sh

    local m="$top/build/soong/soong_ui.bash --make-mode TARGET_PRODUCT=aosp_arm64 TARGET_BUILD_VARIANT=userdebug"

    # This command tests:
    #   The release state for AIDL.
    #   ABI difference between user and userdebug builds.
    #   Resource/SDK finalization.
    AIDL_FROZEN_REL=true $m
}

finalize_main_step1_and_m
+4 −9
Original line number Diff line number Diff line
@@ -2,21 +2,16 @@

set -ex

function finalize_main() {
    local top="$(dirname "$0")"/../..
function finalize_main_step1() {
    local top="$(dirname "$0")"/../../../..
    source $top/build/make/tools/finalization/environment.sh

    # default target to modify tree and build SDK
    local m="$top/build/soong/soong_ui.bash --make-mode TARGET_PRODUCT=aosp_arm64 TARGET_BUILD_VARIANT=userdebug"

    # Build finalization artifacts.
    source $top/build/make/tools/finalization/finalize-aidl-vndk-sdk-resources.sh

    # This command tests:
    #   The release state for AIDL.
    #   ABI difference between user and userdebug builds.
    #   Resource/SDK finalization.
    AIDL_FROZEN_REL=true $m
}

finalize_main
finalize_main_step1
+30 −0
Original line number Diff line number Diff line
From 12eea1512f2612f41b5cf7004ee2e6a189d548d7 Mon Sep 17 00:00:00 2001
From: Alex Buynytskyy <alexbuy@google.com>
Date: Thu, 01 Sep 2022 10:44:21 -0700
Subject: [PATCH] Hacky workaround for half-finalized builds.

Metalava increments the SDK level by one when it's not "REL", so we
temporarily force the build to be "REL" while we're still in the
process of finalizing it.

This CL must be reverted as part of actually declaring "REL".

Bug: none
Test: Build
Change-Id: I8c24c6dabec0270bc384d8465c582a4ddbe8bd6c
---

diff --git a/java/droidstubs.go b/java/droidstubs.go
index 5777b18..ec4a0f4 100644
--- a/java/droidstubs.go
+++ b/java/droidstubs.go
@@ -386,7 +386,8 @@
 	}
 	if apiVersions != nil {
 		cmd.FlagWithArg("--current-version ", ctx.Config().PlatformSdkVersion().String())
-		cmd.FlagWithArg("--current-codename ", ctx.Config().PlatformSdkCodename())
+		// STOPSHIP: RESTORE THIS LOGIC WHEN DECLARING "REL" BUILD
+		// cmd.FlagWithArg("--current-codename ", ctx.Config().PlatformSdkCodename())
 		cmd.FlagWithInput("--apply-api-levels ", apiVersions)
 	}
 }
+26 −0
Original line number Diff line number Diff line
From c0f6e8fe4c3b6803be97aeea6683631d616412f4 Mon Sep 17 00:00:00 2001
From: Alex Buynytskyy <alexbuy@google.com>
Date: Thu, 08 Dec 2022 17:52:52 +0000
Subject: [PATCH] Revert "Hacky workaround for half-finalized builds."

This reverts commit 12eea1512f2612f41b5cf7004ee2e6a189d548d7.

Reason for revert: finalization-2

Change-Id: Ifc801271628808693b1cb20206f8f81c9a6c694d
---

diff --git a/java/droidstubs.go b/java/droidstubs.go
index ec4a0f4..5777b18 100644
--- a/java/droidstubs.go
+++ b/java/droidstubs.go
@@ -386,8 +386,7 @@
 	}
 	if apiVersions != nil {
 		cmd.FlagWithArg("--current-version ", ctx.Config().PlatformSdkVersion().String())
-		// STOPSHIP: RESTORE THIS LOGIC WHEN DECLARING "REL" BUILD
-		// cmd.FlagWithArg("--current-codename ", ctx.Config().PlatformSdkCodename())
+		cmd.FlagWithArg("--current-codename ", ctx.Config().PlatformSdkCodename())
 		cmd.FlagWithInput("--apply-api-levels ", apiVersions)
 	}
 }
Loading