Skip to content

Commit 59a7499

Browse files
committed
Pass chaquopyRepository, chaquopyVersion, agpVersion and kotlinVersion using Jinja templates
1 parent 184d9c5 commit 59a7499

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+200
-538
lines changed

product/gradle-plugin/src/test/integration/data/AndroidPlugin/old/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ buildscript {
22
repositories {
33
google()
44
mavenCentral()
5-
maven { url chaquopyRepository }
5+
maven { url $/{{ chaquopyRepository }}/$ }
66
}
77
dependencies {
8-
classpath "com.android.tools.build:gradle:$agpVersion"
8+
classpath "com.android.tools.build:gradle:{{ agpVersion }}"
99
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.20"
10-
classpath "com.chaquo.python:gradle:$chaquopyVersion"
10+
classpath "com.chaquo.python:gradle:{{ chaquopyVersion }}"
1111
}
1212
}
1313

product/gradle-plugin/src/test/integration/data/AndroidPlugin/old/gradle.properties

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
1-
# The test script uses this to set JAVA_HOME.
2-
chaquopy.java.version=11
3-
4-
agpVersion=7.0.4
5-
6-
# These variables will be filled in by the test script.
7-
chaquopyRepository=
8-
chaquopyVersion=
1+
chaquopy.javaVersion=11
2+
chaquopy.agpVersion=7.0.4
93

104
# Gradle Daemon will terminate itself after specified number of idle milliseconds. Default is
115
# 10800000 (3 hours), but that can overload the machine when running integration tests on many

product/gradle-plugin/src/test/integration/data/ChaquopyPlugin/apply_buildscript/app/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ buildscript {
22
repositories {
33
google()
44
jcenter()
5-
maven { url chaquopyRepository }
5+
maven { url $/{{ chaquopyRepository }}/$ }
66
}
77
dependencies {
8-
classpath "com.android.tools.build:gradle:$agpVersion"
9-
classpath "com.chaquo.python:gradle:$chaquopyVersion"
8+
classpath "com.android.tools.build:gradle:{{ agpVersion }}"
9+
classpath "com.chaquo.python:gradle:{{ chaquopyVersion }}"
1010
}
1111
}
1212

product/gradle-plugin/src/test/integration/data/ChaquopyPlugin/settings_plugins/settings.gradle.kts

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
pluginManagement {
2-
// These are defined in gradle.properties.
3-
val chaquopyRepository: String by settings
4-
val chaquopyVersion: String by settings
5-
val agpVersion: String by settings
6-
val kotlinVersion: String by settings
7-
82
repositories {
9-
maven { url = uri(chaquopyRepository) }
3+
maven { url = uri("""{{ chaquopyRepository }}""") }
104
google {
115
content {
126
includeGroupByRegex("com\\.android.*")
@@ -17,19 +11,13 @@ pluginManagement {
1711
mavenCentral()
1812
gradlePluginPortal()
1913
}
20-
plugins {
21-
id("com.android.application") version agpVersion
22-
id("com.android.library") version agpVersion
23-
id("com.android.dynamic-feature") version agpVersion
24-
id("com.chaquo.python") version chaquopyVersion
25-
}
2614
}
2715

2816
plugins {
29-
id("com.android.application") apply false
30-
id("com.android.library") apply false
31-
id("com.android.dynamic-feature") apply false
32-
id("com.chaquo.python") apply false
17+
id("com.android.application") version "{{ agpVersion }}" apply false
18+
id("com.android.library") version "{{ agpVersion }}" apply false
19+
id("com.android.dynamic-feature") version "{{ agpVersion }}" apply false
20+
id("com.chaquo.python") version "{{ chaquopyVersion }}" apply false
3321
}
3422

3523
dependencyResolutionManagement {
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// Top-level build file where you can add configuration options common to all sub-projects/modules.
22
plugins {
3-
id 'com.android.application' version "$agpVersion" apply false
4-
id 'com.android.library' version "$agpVersion" apply false
5-
id 'com.android.dynamic-feature' version "$agpVersion" apply false
3+
id 'com.android.application' version "{{ agpVersion }}" apply false
4+
id 'com.android.library' version "{{ agpVersion }}" apply false
5+
id 'com.android.dynamic-feature' version "{{ agpVersion }}" apply false
66
id 'org.jetbrains.kotlin.android' version '1.7.10' apply false
7-
id 'com.chaquo.python' version "$chaquopyVersion" apply false
7+
id 'com.chaquo.python' version "{{ chaquopyVersion }}" apply false
88
}

product/gradle-plugin/src/test/integration/data/base/7.3/gradle.properties

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
1-
# The test script uses this to set JAVA_HOME.
2-
chaquopy.java.version=11
3-
4-
agpVersion=7.3.1
5-
6-
# These variables will be filled in by the test script.
7-
chaquopyRepository=
8-
chaquopyVersion=
1+
chaquopy.javaVersion=11
2+
chaquopy.agpVersion=7.3.1
93

104
# Gradle Daemon will terminate itself after specified number of idle milliseconds. Default is
115
# 10800000 (3 hours), but that can overload the machine when running integration tests on many

product/gradle-plugin/src/test/integration/data/base/7.3/settings.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ pluginManagement {
33
gradlePluginPortal()
44
google()
55
mavenCentral()
6-
maven { url chaquopyRepository }
6+
maven { url $/{{ chaquopyRepository }}/$ }
77
}
88
}
99
dependencyResolutionManagement {
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// Top-level build file where you can add configuration options common to all sub-projects/modules.
22
plugins {
3-
id 'com.android.application' version "$agpVersion" apply false
4-
id 'com.android.library' version "$agpVersion" apply false
5-
id 'com.android.dynamic-feature' version "$agpVersion" apply false
3+
id 'com.android.application' version "{{ agpVersion }}" apply false
4+
id 'com.android.library' version "{{ agpVersion }}" apply false
5+
id 'com.android.dynamic-feature' version "{{ agpVersion }}" apply false
66
id 'org.jetbrains.kotlin.android' version '1.7.21' apply false
7-
id 'com.chaquo.python' version "$chaquopyVersion" apply false
7+
id 'com.chaquo.python' version "{{ chaquopyVersion }}" apply false
88
}

product/gradle-plugin/src/test/integration/data/base/7.4/gradle.properties

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
1-
# The test script uses this to set JAVA_HOME.
2-
chaquopy.java.version=11
3-
4-
agpVersion=7.4.2
5-
6-
# These variables will be filled in by the test script.
7-
chaquopyRepository=
8-
chaquopyVersion=
1+
chaquopy.javaVersion=11
2+
chaquopy.agpVersion=7.4.2
93

104
# Gradle Daemon will terminate itself after specified number of idle milliseconds. Default is
115
# 10800000 (3 hours), but that can overload the machine when running integration tests on many

product/gradle-plugin/src/test/integration/data/base/7.4/settings.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ pluginManagement {
33
google()
44
mavenCentral()
55
gradlePluginPortal()
6-
maven { url chaquopyRepository }
6+
maven { url $/{{ chaquopyRepository }}/$ }
77
}
88
}
99
dependencyResolutionManagement {

0 commit comments

Comments
 (0)