File tree Expand file tree Collapse file tree
debugdrawer/src/main/java/com/abualzait/debugdrawer/modules Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -41,7 +41,12 @@ class AppInfoModule @Inject constructor(
4141 view.findViewById<TextView >(R .id.tv_app_name).text = getAppName()
4242 view.findViewById<TextView >(R .id.tv_package_name).text = context.packageName
4343 view.findViewById<TextView >(R .id.tv_version_name).text = packageInfo.versionName
44- view.findViewById<TextView >(R .id.tv_version_code).text = packageInfo.longVersionCode.toString()
44+ view.findViewById<TextView >(R .id.tv_version_code).text = if (Build .VERSION .SDK_INT >= Build .VERSION_CODES .P ) {
45+ packageInfo.longVersionCode.toString()
46+ } else {
47+ @Suppress(" DEPRECATION" )
48+ packageInfo.versionCode.toString()
49+ }
4550 view.findViewById<TextView >(R .id.tv_target_sdk).text = packageInfo.applicationInfo.targetSdkVersion.toString()
4651 view.findViewById<TextView >(R .id.tv_min_sdk).text = packageInfo.applicationInfo.minSdkVersion.toString()
4752 } catch (e: PackageManager .NameNotFoundException ) {
Original file line number Diff line number Diff line change 44before_install :
55 - echo "Starting JitPack build for Android Debug Drawer"
66
7+ install :
8+ - ./gradlew :debugdrawer:clean :debugdrawer:publishToMavenLocal -x lint -x detekt -x ktlintMainSourceSetCheck
9+
710build :
8- - ./gradlew clean build publishToMavenLocal
11+ - ./gradlew :debugdrawer: clean :debugdrawer: build -x lint -x detekt -x ktlintMainSourceSetCheck
912
1013# JitPack will automatically detect the Android library and create the AAR
You can’t perform that action at this time.
0 commit comments