Skip to content

Commit

Permalink
发布lib到jitpack
Browse files Browse the repository at this point in the history
  • Loading branch information
admin\jackl committed Dec 7, 2021
1 parent 0e7b4aa commit 6664df3
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 30 deletions.
1 change: 1 addition & 0 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 8 additions & 9 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
plugins {
id 'com.android.application'
id 'kotlin-android'
}
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'

android {
compileSdk 31
compileSdkVersion 29
buildToolsVersion "29.0.3"

defaultConfig {
applicationId "com.jackl.example"
minSdk 21
targetSdk 31
minSdkVersion 19
targetSdkVersion 29
versionCode 1
versionName "1.0"

Expand All @@ -36,8 +35,8 @@ dependencies {
implementation 'androidx.core:core-ktx:1.3.2'
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'com.google.android.material:material:1.3.0'
implementation project(path: ':injecter')
testImplementation 'junit:junit:4.+'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
implementation project(':injecter')
}
16 changes: 13 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,26 @@ buildscript {
repositories {
google()
mavenCentral()
maven { url 'https://jitpack.io' }
}
dependencies {
classpath "com.android.tools.build:gradle:7.0.3"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.20"

classpath "com.android.tools.build:gradle:4.0.0"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.72"
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

allprojects {
repositories {
google()
mavenCentral()
maven { url 'https://jitpack.io' }
}
}


task clean(type: Delete) {
delete rootProject.buildDir
}
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Tue Dec 07 10:49:48 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.1.1-all.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
17 changes: 9 additions & 8 deletions injecter/build.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
plugins {
id 'com.android.library'
id 'kotlin-android'
}
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'com.github.dcendents.android-maven'
group='com.github.JackL124'

android {
compileSdk 31
compileSdkVersion 29
buildToolsVersion "29.0.3"

defaultConfig {
minSdk 21
targetSdk 31
minSdkVersion 19
targetSdkVersion 29
versionCode 1
versionName "1.0"

Expand Down Expand Up @@ -36,7 +37,7 @@ dependencies {
implementation 'androidx.core:core-ktx:1.3.2'
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'com.google.android.material:material:1.3.0'
testImplementation 'junit:junit:4.+'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
}
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ private void injectField(Class<?> tagetClass) throws NoSuchMethodException, Invo
Method getViewMethod = tagetClass.getMethod("getView");
//取消访问检查
getViewMethod.setAccessible(true);
View mView= (View) getViewMethod.invoke(obj,null);
View mView= (View) getViewMethod.invoke(obj);
bindView = mView.findViewById(id);
}
if (bindView != null) {
Expand Down
8 changes: 0 additions & 8 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -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 = "example"
include ':app'
include ':injecter'

0 comments on commit 6664df3

Please sign in to comment.