diff --git a/mk/android.mk b/mk/android.mk index 0a21b3fdb..b3be9770e 100644 --- a/mk/android.mk +++ b/mk/android.mk @@ -46,6 +46,9 @@ AND_OBJ_TARGET := $(BUILD_TARGET)/obj/jni AND_SHARED := $(BUILD_TARGET)/lib/libavs$(JNI_SUFFIX) AND_SHARED_STRIPPED := $(BUILD_TARGET)/lib/libavs.stripped$(JNI_SUFFIX) AND_JAR := $(BUILD_TARGET)/classes.jar +AND_JAVADOC := $(BUILD_DIST_BASE)/android/javadoc.jar +AND_SOURCES := $(BUILD_DIST_BASE)/android/sources.jar +AND_JAVADOC_PATH := $(BUILD_DIST_BASE)/android/javadoc AND_CLSS := $(patsubst %.java,$(AND_CLS_TARGET)/%.class,$(AND_JAVA_SRCS)) @@ -116,6 +119,12 @@ $(AND_SHARED_STRIPPED): $(AND_SHARED) @cp $< $@ # @$(STRIP) --strip-unneeded $@ +$(AND_JAVADOC): android_javadoc + jar -cvf $(AND_JAVADOC) -C $(AND_JAVADOC_PATH) . + +$(AND_SOURCES): + jar -cvf $(AND_SOURCES) -C android/java/ . + #--- Phony Targets --- .PHONY: android android_jar android_shared android_clean @@ -129,6 +138,15 @@ android_clean: @rm -f $(AND_SHARED) @rm -f $(AND_SHARED_STRIPPED) +.PHONY: android_dist_javadoc +android_dist_javadoc: $(AND_JAVADOC) + +.PHONY: android_javadoc +android_javadoc: + $(JAVADOC) -Xdoclint:none -public -d $(AND_JAVADOC_PATH) -sourcepath android/java/ com.waz.audioeffect com.waz.avs com.waz.call com.waz.log com.waz.media.manager + +.PHONY: android_dist_sources +android_dist_sources: $(AND_SOURCES) ..PHONY: android_emulator android_emulator: diff --git a/mk/dist.mk b/mk/dist.mk index 72b552fcd..2f6bd3dc4 100644 --- a/mk/dist.mk +++ b/mk/dist.mk @@ -103,7 +103,10 @@ DIST_BUNDLE_LIB := \ #--- Target Definitions -DIST_AND_TARGETS := $(BUILD_DIST_AND)/avs.aar +DIST_AND_TARGETS := \ + $(BUILD_DIST_AND)/avs.aar \ + $(BUILD_DIST_AND)/javadoc.jar \ + $(BUILD_DIST_AND)/sources.jar DIST_IOS_TARGETS := \ $(BUILD_DIST_IOS)/$(BUILD_LIB_REL).framework.zip \ diff --git a/mk/target.mk b/mk/target.mk index ecc1ff19d..cb6fed08e 100644 --- a/mk/target.mk +++ b/mk/target.mk @@ -247,6 +247,7 @@ WEBRTC_VER := 20200603.12 endif JAVAC := javac +JAVADOC := javadoc AFLAGS := cr