Skip to content

Commit

Permalink
android: Generate javadoc and sources jars (#28)
Browse files Browse the repository at this point in the history
* Generate javadoc and sources jars
* Add it to dist_android
* javadoc: fix paths for dist_android

Co-authored-by: Chris Owen <[email protected]>
  • Loading branch information
mythsunwind and c-g-owen committed Sep 21, 2021
1 parent 556e8d7 commit b88f7fc
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
18 changes: 18 additions & 0 deletions mk/android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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))

Expand Down Expand Up @@ -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
Expand All @@ -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:
Expand Down
5 changes: 4 additions & 1 deletion mk/dist.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
1 change: 1 addition & 0 deletions mk/target.mk
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ WEBRTC_VER := 20200603.12
endif

JAVAC := javac
JAVADOC := javadoc

AFLAGS := cr

Expand Down

0 comments on commit b88f7fc

Please sign in to comment.