diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 6c865b5..fcbc2c8 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -1,6 +1,6 @@ + package="com.knightboot.spwaitkiller.sample"> diff --git a/app/src/main/java/com/knightboot/spwaitkiller/sample/MainActivity.java b/app/src/main/java/com/knightboot/spwaitkiller/sample/MainActivity.java index 6d68baf..1a9ac8c 100644 --- a/app/src/main/java/com/knightboot/spwaitkiller/sample/MainActivity.java +++ b/app/src/main/java/com/knightboot/spwaitkiller/sample/MainActivity.java @@ -2,7 +2,6 @@ import androidx.appcompat.app.AppCompatActivity; -import android.annotation.SuppressLint; import android.content.Intent; import android.os.Bundle; import android.os.Handler; @@ -10,7 +9,6 @@ import android.util.Log; import android.view.View; -import com.knightboot.spwaitkiller.R; import com.knightboot.spwaitkiller.Reflection; import com.knightboot.spwaitkiller.SpWaitKiller; @@ -18,7 +16,6 @@ import java.lang.reflect.Method; import java.util.Collection; import java.util.LinkedList; -import java.util.List; import java.util.concurrent.CountDownLatch; public class MainActivity extends AppCompatActivity { diff --git a/app/src/main/java/com/knightboot/spwaitkiller/sample/SecondActivity.java b/app/src/main/java/com/knightboot/spwaitkiller/sample/SecondActivity.java index 7795566..efebf16 100644 --- a/app/src/main/java/com/knightboot/spwaitkiller/sample/SecondActivity.java +++ b/app/src/main/java/com/knightboot/spwaitkiller/sample/SecondActivity.java @@ -4,7 +4,6 @@ import android.os.Bundle; -import com.knightboot.spwaitkiller.R; public class SecondActivity extends AppCompatActivity { diff --git a/build.gradle b/build.gradle index 216d57c..4cfe3f6 100644 --- a/build.gradle +++ b/build.gradle @@ -1,17 +1,29 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { repositories { - google() mavenCentral() + google() + maven { url 'https://jitpack.io' } + mavenLocal() } dependencies { - classpath "com.android.tools.build:gradle:7.0.0" - + classpath 'com.android.tools.build:gradle:4.2.2' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } } +allprojects { + repositories { + mavenCentral() + google() + maven { url 'https://jitpack.io' } + mavenLocal() + } + tasks.withType(Javadoc) { + enabled = false + } +} task clean(type: Delete) { delete rootProject.buildDir } \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index ada77bc..a768b82 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ #Tue Sep 14 19:34:58 CST 2021 distributionBase=GRADLE_USER_HOME -distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-all.zip distributionPath=wrapper/dists zipStorePath=wrapper/dists zipStoreBase=GRADLE_USER_HOME diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..e69de29 diff --git a/settings.gradle b/settings.gradle index faff159..f2a9a5a 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,11 +1,3 @@ -dependencyResolutionManagement { - repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) - repositories { - google() - mavenCentral() - jcenter() // Warning: this repository is going to shut down soon - } -} rootProject.name = "SpWaitKiller" include ':app' include ':spwaitkiller' diff --git a/spwaitkiller/build.gradle b/spwaitkiller/build.gradle index 7e8fad9..b861782 100644 --- a/spwaitkiller/build.gradle +++ b/spwaitkiller/build.gradle @@ -1,6 +1,9 @@ plugins { id 'com.android.library' + id 'maven-publish' } +group 'com.knightboost' +version '0.0.1' android { compileSdk 30 @@ -30,8 +33,35 @@ android { dependencies { implementation 'androidx.appcompat:appcompat:1.2.0' - implementation 'com.google.android.material:material:1.3.0' testImplementation 'junit:junit:4.+' androidTestImplementation 'androidx.test.ext:junit:1.1.2' androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0' +} + +// Because the components are created only during the afterEvaluate phase, you must +// configure your publications using the afterEvaluate() lifecycle method. +afterEvaluate { + publishing { + publications { + // Creates a Maven publication called "release". + release(MavenPublication) { + // Applies the component for the release build variant. + from components.release + + // You can then customize attributes of the publication as shown below. + groupId = group + artifactId = 'spwaitkiller' + version = version + } + // Creates a Maven publication called “debug”. + debug(MavenPublication) { + // Applies the component for the debug build variant. + from components.debug + + groupId = group + artifactId = 'spwaitkiller' + version = version + '-SNAPSHOT' + } + } + } } \ No newline at end of file