### Add XPopup and Required Gradle Dependencies Source: https://github.com/junixapp/xpopup/blob/master/README.md This snippet provides the necessary Gradle configurations to integrate the XPopup library into an Android project. It includes adding the main XPopup dependency, configuring the JitPack repository, setting the compileSdkVersion to 29 or higher, and listing essential AndroidX dependencies like appcompat, material, and recyclerview. ```Gradle implementation 'com.github.li-xiaojun:XPopup:版本号看上面' ``` ```Gradle allprojects { repositories { ... maven { url 'https://jitpack.io' } } } ``` ```Gradle compileSdkVersion 29 ``` ```Gradle implementation 'androidx.appcompat:appcompat:1.3.1' implementation 'com.google.android.material:material:1.4.0' implementation 'androidx.recyclerview:recyclerview:1.2.1' ``` -------------------------------- ### Apache License 2.0 for XPopup Library Source: https://github.com/junixapp/xpopup/blob/master/README-en.md This snippet provides the full text of the Apache License, Version 2.0, under which the XPopup library is distributed. It outlines the terms and conditions for use, reproduction, and and distribution of the software, including disclaimers and limitations of liability. ```Text Copyright 2019 li-xiaojun 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. ``` -------------------------------- ### Add XPopup Core Library Gradle Dependency Source: https://github.com/junixapp/xpopup/blob/master/README-en.md This snippet demonstrates how to include the main XPopup library as a dependency in your Android project's `build.gradle` file. Ensure your `compileSdkVersion` is set to 26 or higher for compatibility. ```groovy implementation 'com.lxj:xpopup:1.9.0' ``` -------------------------------- ### XPopup Proguard Rules for Release Builds Source: https://github.com/junixapp/xpopup/blob/master/README-en.md Apply these Proguard rules to prevent XPopup's internal `widget` classes from being stripped or obfuscated during the build process, which is essential for the library to function correctly in release or production APKs. ```proguard -dontwarn com.lxj.xpopup.widget.** -keep class com.lxj.xpopup.widget.**{*;} ``` -------------------------------- ### Add Android Support Library Dependencies for XPopup Source: https://github.com/junixapp/xpopup/blob/master/README-en.md These additional dependencies for Android Support Libraries (appcompat-v7, recyclerview-v7, and design) are crucial for XPopup's functionality. It is required that their version is 28.0.0 or greater to ensure proper operation. ```groovy implementation 'com.android.support:appcompat-v7:28.0.0' implementation 'com.android.support:recyclerview-v7:28.0.0' implementation 'com.android.support:design:28.0.0' ``` -------------------------------- ### Exclude Transitive Dependency in Gradle Source: https://github.com/junixapp/xpopup/blob/master/README.md This Gradle snippet demonstrates how to exclude a specific transitive dependency, subsampling-scale-image-view-androidx, from the XPopup library. This is useful for resolving dependency conflicts if your project already includes a different version of the same library. ```Groovy implementation ('com.github.li-xiaojun:XPopup:版本号看上面'){ exclude group: "com.davemorrissey.labs", module: "subsampling-scale-image-view-androidx" } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.