Browse files

Create both classes.jar and javalib.jar for the prebuilt sdks.

So that SDK can be handled the same way as normal Java libraries in base_rule.mk.
(The same way as android_stubs_current)

Change-Id: I23c709e8ae896fc14b86c1705f339993ebfa4de1
  • Loading branch information...
1 parent 69797d5 commit 219d8ef86142f6d4ba71276b67ec3b10f978ef98 Ying Wang committed Sep 28, 2010
Showing with 38 additions and 120 deletions.
  1. +3 −3 Android.mk
  2. +1 −9 {sdk/4 → ndk}/Android.mk
  3. +0 −27 sdk/5/Android.mk
  4. +0 −27 sdk/6/Android.mk
  5. +0 −27 sdk/7/Android.mk
  6. +0 −27 sdk/8/Android.mk
  7. +34 −0 sdk/Android.mk
View
6 Android.mk
@@ -18,6 +18,6 @@ LOCAL_PATH := $(my-dir)
include $(call first-makefiles-under, \
$(LOCAL_PATH)/common \
$(LOCAL_PATH)/$(TARGET_PREBUILT_TAG) \
- $(LOCAL_PATH)/$(HOST_PREBUILT_TAG) \
- $(LOCAL_PATH)/sdk \
- $(LOCAL_PATH)/ndk)
+ $(LOCAL_PATH)/$(HOST_PREBUILT_TAG)) \
+ $(LOCAL_PATH)/sdk/Android.mk \
+ $(LOCAL_PATH)/ndk/Android.mk
View
10 sdk/4/Android.mk → ndk/Android.mk
@@ -15,13 +15,5 @@
#
LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-LOCAL_MODULE := sdk_v4
-LOCAL_SRC_FILES := android.jar
-LOCAL_MODULE_CLASS := JAVA_LIBRARIES
-LOCAL_MODULE_SUFFIX := $(COMMON_JAVA_PACKAGE_SUFFIX)
-LOCAL_BUILT_MODULE_STEM := classes.jar
-LOCAL_UNINSTALLABLE_MODULE := true
-
-include $(BUILD_PREBUILT)
+include $(call all-makefiles-under,$(LOCAL_PATH))
View
27 sdk/5/Android.mk
@@ -1,27 +0,0 @@
-#
-# Copyright (C) 2010 The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_MODULE := sdk_v5
-LOCAL_SRC_FILES := android.jar
-LOCAL_MODULE_CLASS := JAVA_LIBRARIES
-LOCAL_MODULE_SUFFIX := $(COMMON_JAVA_PACKAGE_SUFFIX)
-LOCAL_BUILT_MODULE_STEM := classes.jar
-LOCAL_UNINSTALLABLE_MODULE := true
-
-include $(BUILD_PREBUILT)
View
27 sdk/6/Android.mk
@@ -1,27 +0,0 @@
-#
-# Copyright (C) 2010 The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_MODULE := sdk_v6
-LOCAL_SRC_FILES := android.jar
-LOCAL_MODULE_CLASS := JAVA_LIBRARIES
-LOCAL_MODULE_SUFFIX := $(COMMON_JAVA_PACKAGE_SUFFIX)
-LOCAL_BUILT_MODULE_STEM := classes.jar
-LOCAL_UNINSTALLABLE_MODULE := true
-
-include $(BUILD_PREBUILT)
View
27 sdk/7/Android.mk
@@ -1,27 +0,0 @@
-#
-# Copyright (C) 2010 The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_MODULE := sdk_v7
-LOCAL_SRC_FILES := android.jar
-LOCAL_MODULE_CLASS := JAVA_LIBRARIES
-LOCAL_MODULE_SUFFIX := $(COMMON_JAVA_PACKAGE_SUFFIX)
-LOCAL_BUILT_MODULE_STEM := classes.jar
-LOCAL_UNINSTALLABLE_MODULE := true
-
-include $(BUILD_PREBUILT)
View
27 sdk/8/Android.mk
@@ -1,27 +0,0 @@
-#
-# Copyright (C) 2010 The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_MODULE := sdk_v8
-LOCAL_SRC_FILES := android.jar
-LOCAL_MODULE_CLASS := JAVA_LIBRARIES
-LOCAL_MODULE_SUFFIX := $(COMMON_JAVA_PACKAGE_SUFFIX)
-LOCAL_BUILT_MODULE_STEM := classes.jar
-LOCAL_UNINSTALLABLE_MODULE := true
-
-include $(BUILD_PREBUILT)
View
34 sdk/Android.mk
@@ -0,0 +1,34 @@
+#
+# Copyright (C) 2010 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+
+# $(1): sdk version
+define _copy_prebuilt_sdk_to_the_right_place
+_cpsttrp_src_jar := $(LOCAL_PATH)/$(1)/android.jar
+_cpsttrp_sdk_intermediates := $(call intermediates-dir-for,JAVA_LIBRARIES,sdk_v$(1),,COMMON)
+$$(_cpsttrp_sdk_intermediates)/classes.jar : $$(_cpsttrp_src_jar) | $(ACP)
+ $$(call copy-file-to-target)
+
+$$(_cpsttrp_sdk_intermediates)/javalib.jar : $$(_cpsttrp_sdk_intermediates)/classes.jar | $(ACP)
+ $$(call copy-file-to-target)
+endef
+
+_historic_sdk_versions := $(filter-out current, $(TARGET_AVAILABLE_SDK_VERSIONS))
+$(foreach s,$(_historic_sdk_versions),$(eval $(call _copy_prebuilt_sdk_to_the_right_place,$(s))))
+
+include $(call all-makefiles-under,$(LOCAL_PATH))

0 comments on commit 219d8ef

Please sign in to comment.