Skip to content

Commit

Permalink
support gradle tools 4.+
Browse files Browse the repository at this point in the history
  • Loading branch information
肖琪(融汇/产品技术中心) committed Jun 1, 2021
1 parent 0e889cb commit 342b4e2
Show file tree
Hide file tree
Showing 15 changed files with 204 additions and 65 deletions.
134 changes: 134 additions & 0 deletions .idea/codeStyles/Project.xml

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

24 changes: 7 additions & 17 deletions .idea/compiler.xml

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

2 changes: 2 additions & 0 deletions .idea/gradle.xml

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

16 changes: 13 additions & 3 deletions .idea/misc.xml

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

12 changes: 6 additions & 6 deletions .idea/modules.xml

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

1 change: 1 addition & 0 deletions .idea/runConfigurations.xml

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

2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ project的gradle:
...
aspectjx{
include "com.noober.savehelper"
exclude 'versions.9'
}

}
## 混淆配置:

Expand Down
29 changes: 12 additions & 17 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,39 +1,34 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
ext.kotlin_version = '1.2.30'
ext.kotlin_version = '1.4.10'

repositories {
jcenter()
maven {
url 'https://maven.google.com/'
name 'Google'
}
maven {
url uri('publish')
}
maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
maven { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter' }
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.2'
classpath 'com.android.tools.build:gradle:4.2.1'
classpath 'com.novoda:bintray-release:0.8.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.noober.plugin:savehelper-plugin:3.0.7'
// classpath 'com.noober.save:plugin:3.0.7'
classpath 'org.aspectj:aspectjtools:1.8.13'
classpath 'com.hujiang.aspectjx:gradle-android-plugin-aspectjx:2.0.2'
// classpath 'com.noober.plugin:savehelper-plugin:3.0.7'
classpath 'com.noober.save:plugin:3.0.7'
classpath 'org.aspectj:aspectjtools:1.9.4'
classpath 'com.hujiang.aspectjx:gradle-android-plugin-aspectjx:2.0.10'
}
}

allprojects {
repositories {
jcenter()
maven {
url 'https://maven.google.com/'
name 'Google'
}
maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
maven { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter' }
google()
}
tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
Expand All @@ -50,7 +45,7 @@ ext {
userOrg = 'noober'
groupId = 'com.noober'
uploadName = 'AutoSaver'
publishVersion = '3.0.7'
publishVersion = '4.0.0'
desc = "A light weight framework can automatically generate 'OnSaveInstanceState' code"
website = 'https://github.com/JavaNoober/AutoSave'
// gradlew clean build bintrayUpload -PbintrayUser=xiaoqiandroid -PbintrayKey=xxxxxxxxxxxxxxxx -PdryRun=false
Expand Down
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#org.gradle.jvmargs= -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005;
org.gradle.jvmargs=-Xmx4096m
org.gradle.parallel=true
kapt.use.worker.api=false
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
Expand Down
6 changes: 3 additions & 3 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Wed Aug 15 11:27:21 CST 2018
#Tue Jun 01 16:52:39 CST 2021
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
zipStoreBase=GRADLE_USER_HOME
15 changes: 10 additions & 5 deletions sample/build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-kapt'
apply plugin: 'kotlin-android-extensions'

apply plugin: 'kotlin-android'
apply plugin: 'AutoSave'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
//apply plugin: 'AutoSave'
apply plugin: 'android-aspectjx'

android {
Expand All @@ -25,6 +26,10 @@ android {
}
}

aspectjx {
include "com.noober.savehelper"
exclude 'versions.9'
}
}


Expand All @@ -36,10 +41,10 @@ dependencies {
})
implementation 'com.android.support:appcompat-v7:26.0.1'
testImplementation 'junit:junit:4.12'
implementation 'org.aspectj:aspectjrt:1.8.13'
implementation 'org.aspectj:aspectjrt:1.9.4'
implementation project(':savehelper')
implementation project(':savehelper-api')
kapt project(':savehelper-processor')
implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
// implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
}

Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ public class SampleActivity extends AppCompatActivity {
Bundle bundle;


@NeedSave
private SecondSExample secondSExample;
// @NeedSave
// private SecondSExample secondSExample;

// @NeedSave
// SecondSExample2 secondSExample2;
Expand Down
2 changes: 1 addition & 1 deletion savehelper-plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ dependencies {
//groovy sdk
implementation 'com.android.tools.build:gradle:3.1.2'
// implementation 'org.javassist:javassist:3.20.0-GA'
implementation 'org.aspectj:aspectjtools:1.8.13'
implementation 'org.aspectj:aspectjtools:1.9.4'
}

repositories {
Expand Down
Loading

0 comments on commit 342b4e2

Please sign in to comment.