mobile/com.sap.sailing.android.buoy.positioning.app/assets/build.info
... ...
@@ -1 +0,0 @@
1
-${git.branch}-${git.commit.id.abbrev} (${git.commit.time})
mobile/com.sap.sailing.android.buoy.positioning.app/build.gradle
... ...
@@ -92,18 +92,16 @@ dependencies {
92 92
}
93 93
94 94
// Custom tasks
95
-if (project.hasProperty("xmake")) {
96
- preBuild.doLast {
97
- // save the combined build info into assets/build.info file
98
- def repo = org.ajoberstar.grgit.Grgit.open(dir: System.env.XMAKE_PROJECTDIR)
99
- def result_line = "${repo.branch.current().getName()}-${repo.head().abbreviatedId} (${new Date().toString()})\n"
100
- def assetsDir = android.sourceSets.main.assets.srcDirs.toArray()[1]
101
- delete(assetsDir)
102
- mkdir(assetsDir)
103
- def buildInfoFile = new File(assetsDir, 'build_gradle.info').getAbsolutePath()
104
- new File(buildInfoFile).write(result_line)
105
- repo.close()
106
- }
95
+preBuild.doLast {
96
+ // save the combined build info into assets/build.info file
97
+ def repo = org.ajoberstar.grgit.Grgit.open(dir: rootProject.rootDir)
98
+ def result_line = "${repo.branch.current().getName()}-${repo.head().abbreviatedId} (${new Date().toString()})\n"
99
+ def assetsDir = android.sourceSets.main.assets.srcDirs.toArray()[1]
100
+ delete(assetsDir)
101
+ mkdir(assetsDir)
102
+ def buildInfoFile = new File(assetsDir, 'build.info').getAbsolutePath()
103
+ new File(buildInfoFile).write(result_line)
104
+ repo.close()
107 105
}
108 106
109 107
/**
mobile/com.sap.sailing.android.tracking.app/assets/build.info
... ...
@@ -1 +0,0 @@
1
-${git.branch}-${git.commit.id.abbrev} (${git.commit.time})
mobile/com.sap.sailing.android.tracking.app/build.gradle
... ...
@@ -96,18 +96,16 @@ dependencies {
96 96
}
97 97
98 98
// Custom tasks
99
-if (project.hasProperty("xmake")) {
100
- preBuild.doLast {
101
- // save the combined build info into assets/build.info file
102
- def repo = org.ajoberstar.grgit.Grgit.open(dir: System.env.XMAKE_PROJECTDIR)
103
- def result_line = "${repo.branch.current().getName()}-${repo.head().abbreviatedId} (${new Date().toString()})\n"
104
- def assetsDir = android.sourceSets.main.assets.srcDirs.toArray()[1]
105
- delete(assetsDir)
106
- mkdir(assetsDir)
107
- def buildInfoFile = new File(assetsDir, 'build_gradle.info').getAbsolutePath()
108
- new File(buildInfoFile).write(result_line)
109
- repo.close()
110
- }
99
+preBuild.doLast {
100
+ // save the combined build info into assets/build.info file
101
+ def repo = org.ajoberstar.grgit.Grgit.open(dir: rootProject.rootDir)
102
+ def result_line = "${repo.branch.current().getName()}-${repo.head().abbreviatedId} (${new Date().toString()})\n"
103
+ def assetsDir = android.sourceSets.main.assets.srcDirs.toArray()[1]
104
+ delete(assetsDir)
105
+ mkdir(assetsDir)
106
+ def buildInfoFile = new File(assetsDir, 'build.info').getAbsolutePath()
107
+ new File(buildInfoFile).write(result_line)
108
+ repo.close()
111 109
}
112 110
113 111
/**
mobile/com.sap.sailing.racecommittee.app/assets/build.info
... ...
@@ -1 +0,0 @@
1
-${git.branch}-${git.commit.id.abbrev} (${git.commit.time})
mobile/com.sap.sailing.racecommittee.app/build.gradle
... ...
@@ -98,18 +98,16 @@ dependencies {
98 98
}
99 99
100 100
// Custom tasks
101
-if (project.hasProperty("xmake")) {
102
- preBuild.doLast {
103
- // save the combined build info into assets/build.info file
104
- def repo = org.ajoberstar.grgit.Grgit.open(dir: System.env.XMAKE_PROJECTDIR)
105
- def result_line = "${repo.branch.current().getName()}-${repo.head().abbreviatedId} (${new Date().toString()})\n"
106
- def assetsDir = android.sourceSets.main.assets.srcDirs.toArray()[1]
107
- delete(assetsDir)
108
- mkdir(assetsDir)
109
- def buildInfoFile = new File(assetsDir, 'build_gradle.info').getAbsolutePath()
110
- new File(buildInfoFile).write(result_line)
111
- repo.close()
112
- }
101
+preBuild.doLast {
102
+ // save the combined build info into assets/build.info file
103
+ def repo = org.ajoberstar.grgit.Grgit.open(dir: rootProject.rootDir)
104
+ def result_line = "${repo.branch.current().getName()}-${repo.head().abbreviatedId} (${new Date().toString()})\n"
105
+ def assetsDir = android.sourceSets.main.assets.srcDirs.toArray()[1]
106
+ delete(assetsDir)
107
+ mkdir(assetsDir)
108
+ def buildInfoFile = new File(assetsDir, 'build.info').getAbsolutePath()
109
+ new File(buildInfoFile).write(result_line)
110
+ repo.close()
113 111
}
114 112
115 113
/**